Skip to content
This repository has been archived by the owner on Dec 29, 2022. It is now read-only.

I can't show more than 6 lines in one chart #131

Closed
kelegorm opened this issue May 14, 2015 · 2 comments
Closed

I can't show more than 6 lines in one chart #131

kelegorm opened this issue May 14, 2015 · 2 comments
Assignees
Labels

Comments

@kelegorm
Copy link
Contributor

I want to show in one chart more than 6 lines. How I can to do it? I have tried this:

var measures = [];
for (int i = 1; i < data.columns.length && i < 7; i++) {
  measures.add(i);
}

var series = new ChartSeries("one", measures, new LineChartRenderer()),

then config, area, draw...

As you can see I have destriction to 6 measure numbers in measures list. But when I try to add one more I get some error:

Exception: Uncaught Error: RangeError: index (7) must be in the range [0..7)
Stack Trace: 
#0      List.[] (dart:core-patch/growable_array.dart:136)
#1      List.elementAt (dart:core-patch/growable_array.dart:308)
#2      CartesianRendererBase.extent (package:charted/charts/cartesian_renderers/cartesian_base_renderer.dart:91:25)
#3      _CartesianArea._initAxes.<anonymous closure>.<anonymous closure> (package:charted/charts/src/cartesian_area_impl.dart:385:63)
#4      MappedListIterable.elementAt (dart:_internal/iterable.dart:413)
#5      ListIterable.toList (dart:_internal/iterable.dart:219)
#6      _CartesianArea._initAxes.<anonymous closure> (package:charted/charts/src/cartesian_area_impl.dart:385:71)

I have tried to create 7 different Line Chart Renderers but it cause same error. I have delving in sourses but can't find restrictions for line count.

Is it possible to show more than 6 lines and how to get it? Thanks.

@psunkari
Copy link
Contributor

Hi Dmitriy,
Thanks for the report. I will take a look at it.

@psunkari psunkari added the bug label May 14, 2015
@psunkari psunkari self-assigned this May 14, 2015
@kelegorm
Copy link
Contributor Author

kelegorm commented Jun 9, 2015

Sorry, it was my bug, another issue. Wrong data in input.

So, problem was I have rows with different length. In this case count of columns was as shortest row length and charts can't display other lines.

@psunkari psunkari added wontfix and removed bug labels Sep 2, 2015
@psunkari psunkari closed this as completed Sep 2, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants