react-native-chart-kit
react-native-chart-kit copied to clipboard
Fixed min/max Y label value in BarChart and LineChart
Thank you for providing the great chart kit!
I think it is better to provide a way to configure the Y label value because the UI is not good if all values are the same as follows.
Thus I'd like to configure the min/max Y label value in BarChart
and LineChart
like this. (It's referencing Google Charts)
<BarChart
style={graphStyle}
data={data}
width={screenWidth}
height={220}
chartConfig={chartConfig}
maxValue={500} # new props
minValue={0} # new props
/>
Thanks.
Is this option available?
This option is not available, but if someone made a PR for this, that would be great!
Hi everyone, please any news on this feature ?
<BarChart
style={graphStyle}
data={data}
width={screenWidth}
height={220}
chartConfig={chartConfig}
fromNumber={500}
fromZero={true}
/>
the prop fromNumber seems to work at-least on bar charts as a maximum value
<BarChart style={graphStyle} data={data} width={screenWidth} height={220} chartConfig={chartConfig} fromNumber={500} fromZero={true} />
the prop fromNumber seems to work at-least on bar charts as a maximum value
This is sufficient enough
A simple Given Solution To Set Min & Max Values With Hidden Dots
<LineChart
data={{
labels: xAxis,
datasets: [
{
data: yAxis,
},
{
data:[0], // Set Min
withDots: false, // Hide Dots
},
{
data:[10], // Set Max
withDots: false, // Hide Dots
}
]
}}
A simple Given Solution To Set Min & Max Values With Hidden Dots
<LineChart data={{ labels: xAxis, datasets: [ { data: yAxis, }, { data:[0], // Set Min withDots: false, // Hide Dots }, { data:[10], // Set Max withDots: false, // Hide Dots } ] }}
Genius!
is there any possible
A simple Given Solution To Set Min & Max Values With Hidden Dots
<LineChart data={{ labels: xAxis, datasets: [ { data: yAxis, }, { data:[0], // Set Min withDots: false, // Hide Dots }, { data:[10], // Set Max withDots: false, // Hide Dots } ] }}
is there any possibility for format like [20,30,40,50,60] ?