Questions tagged [react-native-chart-kit]
73 questions
8
votes
1 answer
How to add horizontal scrolling for react-native-chart-kit StackedBarChart?
I'm looking forward to create horizontally scrollable StackedBarChart with react-native-chart-kit. Is it possible to create such chart with this package and how?

she hates me
- 1,212
- 5
- 25
- 44
5
votes
1 answer
Fill Parent Container with react-native-chart-kit Chart (React Native, Expo)
I am using react-native-chart-kit in a React Native Expo app to render charts. The example provided in the docs work fine
Problem: In my app, the chart is needed to fill a parent container, but it appears that the chart must have the height props as…

Nyxynyx
- 61,411
- 155
- 482
- 830
4
votes
1 answer
import Y label in barChart at react native chart kit
I want to put in Ylabels these variables [80,90,100] but the graph starts from the min variable i put in the array I found a way to do it in line chart but it does not work on BarChart
const data = {
labels: ["Sun", "Mon", "Tue", "Wed",…

thnikas
- 79
- 2
- 7
4
votes
3 answers
How to change the background color of the bars in a barchart using react-native-chart-kit
I am using react-native-chart-kit and I am trying to have a cbar chart with any color filling up the bars, as of now it is gray but I am trying to change it but i have tried adding color: {} within the datasets part, as well as svg. But to no…

Ish Montalvo
- 171
- 1
- 11
4
votes
0 answers
How to show the clicked value in react-native-charts-kit
I've made an app that shows a graph. I am using react-native-chart-kit package to do this.
I trying to show a pop up view which shows the selected/clicked value:

Ravi
- 165
- 3
- 11
4
votes
2 answers
React Native - Error using Chart Kit (Exception thrown while executing UI block: __NSCFNumber firstObject: unrecognized selector sent to instance)
Im trying to run a basic React Native App using the Chart Kit library I get this error:
CLICK FOR IMAGE: Exception thrown while executing UI block: __NSCFNumber firstObject: unrecognized selector sent to instance 0xa3576e305374b97e
Does someone know…

Rafael
- 93
- 1
- 8
4
votes
1 answer
Plotting sporadic data in react-native-chart-kit
I've recently started playing around with react-native and have been looking into graph/chart libraries for an app idea I have.
I'm really liking the look of react-native-chart-kit however one thing I cant work out is how to plot a series of data…

Darc
- 745
- 10
- 26
4
votes
2 answers
onDataPointClick function doesn't work - react-native-chart-kit
I'm using this library: react-native-chart-kit
I want to catch user's click on line-chart.
this is my code:
console.log('masoud')}
data={{
labels: ['January', 'February', 'March',…

S.M_Emamian
- 17,005
- 37
- 135
- 254
3
votes
0 answers
multiple bars with react-native-chart-kit
This is what i tried: and it doesn't work
i need to make multiple bars like so:
multiple bars chart

Ahmed Hassan
- 31
- 1
- 3
3
votes
0 answers
Is there a way to add x and y axis labels to ReactNative's chart kit?
Is there a way to add x and y axis labels to a line chart from the ReactNative Chart kit? For example, in this graph generated with python you can see that the x and y axes are labeled "Year" and "Employees":
However, when I look at the github for…

Amy L
- 71
- 1
- 3
3
votes
1 answer
react-native-chart-kit different Shadow color
so I want to draw two lines on my chart, I gave each line a different color using color. I want to give each line a different shadow as well. However by changing withShadow, it will either true for both or false for both, cannot each for each. I…

GHOST
- 203
- 4
- 14
3
votes
4 answers
react-native-chart-kit Min and Max value
I really like how neat react-native-chart-kit is, however I am having a problem with how it display the data.
it use the lowest point in your data as the as the bottom and the highest as the top. There is an option to start from zero, but what if I…

GHOST
- 203
- 4
- 14
3
votes
0 answers
Export react-native-chart-kit chart to PDF
I'm trying to export a chart created with react-native-chart-kit to a PDF document with expo-print. I'm having a hard time trying to do so. I can't find the way to render the chart inside the PDF, it only puts text with the chart description.
Here's…

lpcuellar
- 75
- 4
3
votes
4 answers
Solid bars in bar chart with react-native-chart-kit
I am using https://www.npmjs.com/package/react-native-chart-kit and am trying to make a chart to match the following design spec:
I can get most of the options to work with the code attached at the end of this question, however I can't seem to…

kinghenry14
- 1,187
- 1
- 11
- 34
3
votes
1 answer
How to change the Y-axis values from numbers to strings in react native chart kit
I'm using react-native-chart-kit to display and am trying to change the y-axis (see screen shot below). I tried filling the yLabels property with an array of strings. But that didn't work. Any help would be appreciated!

Feni Herbert
- 75
- 1
- 6