Skip to content
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

Documentation: clarify how to use multiple independent variables #283

Open
RichardNeill opened this issue Sep 17, 2017 · 0 comments
Open

Comments

@RichardNeill
Copy link

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:

  1. 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.

  2. 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.

  1. 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 }

  2. If the source data is in the first form, it's often necessary to reshape the array into the second.

  3. 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant