Is discontinuous data supported? #965
-
Hi, Is there a way to make a line graph with discontinuous data? For example with: Thank you! |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 2 replies
-
Yes @grotewortel you can find the convenient x-interval and add empty objects at intervals that have no data. data = {[
{value: 300},
{}, // at x = 5, insert a dummy object
{value: 300},
{value: 280}
]}; |
Beta Was this translation helpful? Give feedback.
-
Hi, Thank you for your fast answer! That will work for me I guess. I am not sure if it will be a solution for everybody because it might end up with a lot of dummy objects. When trying this out, it looks like the X label width is influenced by the dummy objects. The line chart does not seem to have an labelWidth property. original data:
the same data but now with dummy objects:
Chart code:
Question 2 Question 3 Again, thank you for your time and effort. I is highly appreciated! |
Beta Was this translation helpful? Give feedback.
-
Hi @grotewortel Q1. x-axis label width can be controlled using the Q2. To fit the entire chart, along with Q3. The small black dots on the x-axis are coming because you used |
Beta Was this translation helpful? Give feedback.
-
Awesome! The text labes are fixed! The dots are gone also :-) I stripped as much properties as possible to avoid confusion.
|
Beta Was this translation helpful? Give feedback.
-
Looks like the parent View of in your code has some margin/padding. You can use the |
Beta Was this translation helpful? Give feedback.
Yes @grotewortel you can find the convenient x-interval and add empty objects at intervals that have no data.
For example in the data you shared, the interval can be
5
. So the data can be-