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
It's not really clear from the docs how Dimple expects to receive its data. May I suggest it's worth clarifying a couple of points:
Dimple by default assumes that there are multiple X-categories combining to form a single Y-value.
However, this model doesn't work especially well when there are multiple independent Y axes, all driven from a single X variable.
In particular, data of the format:
{ X:0, Y1:1, Y2:2 }
{ X:1, Y1:3, Y2:4 }
{ X:2, Y1:5, Y2:6 }
is not easy to plot as 2 separate line charts, Y1 against X, and Y2 against X.
Dimple's model prefers the JSON to be formatted as:
{ X:0, type:Y1, val:1 }
{ X:0, type:Y2, val:2 }
{ X:1, type:Y1, val:3 }
{ X:1, type:Y2, val:4 }
{ X:2, type:Y1, val:5 }
{ X:2, type:Y2, val:6 }
If the source data is in the first form, it's often necessary to reshape the array into the second.
There seems to be no way to make dimple accept data in the form:
X = [ 0,1,2]
Y1 = [1,3,5]
Y2 = [2,4,6]
I discovered that it's possible to do what I need by explicitly overriding the chart data, but this isn't obvious, and none of the examples work this way. Thanks very much.
The text was updated successfully, but these errors were encountered:
It's not really clear from the docs how Dimple expects to receive its data. May I suggest it's worth clarifying a couple of points:
Dimple by default assumes that there are multiple X-categories combining to form a single Y-value.
However, this model doesn't work especially well when there are multiple independent Y axes, all driven from a single X variable.
In particular, data of the format:
{ X:0, Y1:1, Y2:2 }
{ X:1, Y1:3, Y2:4 }
{ X:2, Y1:5, Y2:6 }
is not easy to plot as 2 separate line charts, Y1 against X, and Y2 against X.
Dimple's model prefers the JSON to be formatted as:
{ X:0, type:Y1, val:1 }
{ X:0, type:Y2, val:2 }
{ X:1, type:Y1, val:3 }
{ X:1, type:Y2, val:4 }
{ X:2, type:Y1, val:5 }
{ X:2, type:Y2, val:6 }
If the source data is in the first form, it's often necessary to reshape the array into the second.
There seems to be no way to make dimple accept data in the form:
X = [ 0,1,2]
Y1 = [1,3,5]
Y2 = [2,4,6]
I discovered that it's possible to do what I need by explicitly overriding the chart data, but this isn't obvious, and none of the examples work this way. Thanks very much.
The text was updated successfully, but these errors were encountered: