-
-
Notifications
You must be signed in to change notification settings - Fork 6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draw X-Axis labels with dates keeping index of x-axis independent like before #2648
Comments
remember x axis in V3 behaves like y axis. So first only add (x,y) to where you need. If you need to 'break line', use one data set for each line segment. Also remember to use valueFormatter to format. It's kind of tricky in V3 |
I am sorry , i didn't get you completely. Do you want to say that i don't need to add 28 points to show 4 labels on x -axis with interval? |
In your first image, there is only two points, so you only have to add two (x,y) in your data set and draw it. |
Thanks for your reply. I got your point. |
In our case, we have to draw line charts for monthly view & yearly view.
1.Monthly Chart : We can have 1-28 data points for drawing on y axis. But we have to keep our X-axis as fixed showing 4 Labels with interval of 7 days [week-wise date].
2.Yearly Chart : We can have 1-365 data points for drawing on y axis. But we have to keep our X-axis as fixed showing 12 Labels with interval of 28 days [month-wise date].
Now with latest update we can not keep x-axis separate & to show fixed labels , i've to add data points with 0 values.But this is not acceptable as per requirements.
Code used for
Please let me know how could i draw charts as shown in screenshot
After updating with latest sdk 3.0.2, Below is code for drawing 1 month line chart
It draws chart as continuous line
The text was updated successfully, but these errors were encountered: