You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note that this isn't simply a matter of finding a new way to do the same thing. The data value supports data points that are either numbers or objects; if the data points are object, then x is required and must be a number. If you need to use an object (eg, the chart is a box plot, or you want to leverage the custom property for a callback), then you need to use a numeric x value, even when it doesn't make sense.
Here is the data for a chart showing the first 4 planets, showing how close and how far they get from the sun. Note how each data point has an x value that simply duplicates its own index:
Let's say you want to create a simple bar chart that shows how many moon Mercury, Venus, Earth, and Mars have. You could do that in a couple of ways:
Option 1: Using formats
Option 2: Using valueLabels
However, this is separating out the data with the labels. If we kept the 2 together, we could instead do something like this:
Note that this isn't simply a matter of finding a new way to do the same thing. The
data
value supports data points that are either numbers or objects; if the data points are object, thenx
is required and must be a number. If you need to use an object (eg, the chart is a box plot, or you want to leverage thecustom
property for a callback), then you need to use a numericx
value, even when it doesn't make sense.Here is the data for a chart showing the first 4 planets, showing how close and how far they get from the sun. Note how each data point has an
x
value that simply duplicates its own index:In this case, it makes more sense to be able to just put down:
instead of duplicating index values and juggling where the data was placed.
The text was updated successfully, but these errors were encountered: