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

[Question] Y axis order #21

Closed
marianoarga opened this issue Nov 1, 2018 · 1 comment
Closed

[Question] Y axis order #21

marianoarga opened this issue Nov 1, 2018 · 1 comment
Labels
question Further information is requested

Comments

@marianoarga
Copy link

marianoarga commented Nov 1, 2018

Hello, how can I order the Y axis in order to show a kind of timeline chart? I'm trying something like this, but the Y axis is not ordering, it just appears in the order is set, '37.93' should appear at the top:

static const myData = [
  ["2018-10-23","37.65"],
  ["2018-10-24","37.63"],
  ["2018-10-25","37.93"],
  ["2018-10-26","37.85"],
  ["2018-10-27","37.85"]
];

...

LineChart(
              lines:
              [
                new Line<List, String, double>(
                  stroke: PaintOptions.stroke(color: Colors.green,strokeWidth: 3.0),
                  marker: MarkerOptions(paint: PaintOptions.fill(color: Colors.blue)),
                  data: myData,
                  xFn: (datum) => datum[0],
                  yFn: (datum) => double.parse(datum[1]),
                ),
              ],
              chartPadding: new EdgeInsets.fromLTRB(60.0, 10.0, 10.0, 30.0),
            )

@thekeenant
Copy link
Owner

Sounds like you want the Y-Axis to be quantitative, similar to what would find here (the "size" of the city).

Something like this?

yAxis: new ChartAxis(
  span: new DoubleSpan(37.5, 38.0),
  tickGenerator: IntervalTickGenerator.byN(0.05)
)

@thekeenant thekeenant added the question Further information is requested label Nov 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants