thekeenant / fcharts

:bar_chart: Create beautiful, responsive, animated charts using a simple and intuitive API.
https://pub.dartlang.org/packages/fcharts
MIT License
326 stars 46 forks source link

LineChart not showing all lines in chart #33

Closed JideGuru closed 4 years ago

JideGuru commented 5 years ago

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