diff --git a/App.js b/App.js index 4165be5c..8c31b6d5 100644 --- a/App.js +++ b/App.js @@ -50,6 +50,12 @@ const chartConfigs = [ backgroundGradientTo: "#ffffff", color: (opacity = 1) => `rgba(0, 0, 0, ${opacity})` }, + { + backgroundColor: "#ffffff", + backgroundGradientFrom: "#ffffff", + backgroundGradientTo: "#ffffff", + color: (opacity = 1) => `rgba(0, 0, 0, ${opacity})` + }, { backgroundColor: "#26872a", backgroundGradientFrom: "#43a047", @@ -172,6 +178,19 @@ export default class App extends React.Component { height={220} chartConfig={chartConfig} /> + + Stacked Bar Graph with custom Y labels + + { + return +input * 2; + }} + /> Stacked Bar Graph Percentile string; } type StackedBarChartState = {}; @@ -185,6 +187,9 @@ class StackedBarChart extends AbstractChart< segments = 4, decimalPlaces, percentile = false, + formatYLabel = (yLabel: string) => { + return yLabel; + }, hideLegend = false } = this.props; @@ -242,7 +247,8 @@ class StackedBarChart extends AbstractChart< data: [0, border], paddingTop, paddingRight, - decimalPlaces + decimalPlaces, + formatYLabel }) : null}