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

LineChart not showing all lines in chart #33

Closed
JideGuru opened this issue Jun 4, 2019 · 0 comments
Closed

LineChart not showing all lines in chart #33

JideGuru opened this issue Jun 4, 2019 · 0 comments

Comments

@JideGuru
Copy link

JideGuru commented Jun 4, 2019

Hello, i wrote a code to make a chart with 3 lines but only 2 shows on chart.

CODE

LineChart(
                      lines: [

                        Line<List, String, double>(
                          data: jic,
                          xFn: (datum) => datum[0],
                          yFn: (datum) => datum[1],
                          xAxis: xAxis,
                          yAxis: ChartAxis(
                            tickLabelFn: (jic) => jic.toString(),
                            tickLabelerStyle: TextStyle(color: Colors.orange, fontWeight: FontWeight.bold),
                            paint: PaintOptions.stroke(color: Colors.orange),
                          ),
                          marker: MarkerOptions(
                            paint: PaintOptions.fill(color: Colors.orange),
                          ),
                          stroke: PaintOptions.stroke(color: Colors.orange),
                          legend: LegendItem(
                            paint: PaintOptions.fill(color: Colors.orange),
                            text: 'Jidecoin',
                          ),
                        ),


                        Line<List, String, double>(
                          data: amc,
                          xFn: (datum) => datum[0],
                          yFn: (datum) => datum[1],
                          xAxis: xAxis,
                          yAxis: ChartAxis(
                            tickLabelFn: (amc) => amc.toString(),
                            tickLabelerStyle: TextStyle(color: Colors.red, fontWeight: FontWeight.bold),
                            paint: PaintOptions.stroke(color: Colors.red),
                          ),
                          marker: MarkerOptions(
                            paint: PaintOptions.fill(color: Colors.red),
                          ),
                          stroke: PaintOptions.stroke(color: Colors.red),
                          legend: LegendItem(
                            paint: PaintOptions.fill(color: Colors.red),
                            text: 'Amolecoin',
                          ),
                        ),


                        Line<List, String, double>(
                          data: bec,
                          xFn: (datum) => datum[0],
                          yFn: (datum) => datum[1],
                          xAxis: xAxis,
                          yAxis: ChartAxis(
                            tickLabelFn: (bec) => bec.toString(),
                            tickLabelerStyle: TextStyle(color: Colors.green, fontWeight: FontWeight.bold),
                            paint: PaintOptions.stroke(color: Colors.green),
                          ),
                          marker: MarkerOptions(
                            paint: PaintOptions.fill(color: Colors.green),
                          ),
                          stroke: PaintOptions.stroke(color: Colors.green),
                          legend: LegendItem(
                            paint: PaintOptions.fill(color: Colors.green),
                            text: 'Bekalucoin',
                          ),
                        ),
                      ],
                      chartPadding: EdgeInsets.fromLTRB(30.0, 22.0, 00.0, 30.0),
                    ),

Result.
Screen Shot 2019-06-04 at 3 55 40 PM

The line third line is not showing..

@JideGuru JideGuru closed this as completed Jul 5, 2020
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