Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
679 views
in Technique[技术] by (71.8m points)

flutter - How to change marker point size in charts_flutter?

I am trying to find a way to change the marker point data in the time series graph from charts_flutter dependency.

enter image description here

As you can see the picture above, I am trying to change the marker point size. I am trying to make it small.

Here is my graph code:

return Container(
            height: 250,
            child: Card(
              child: Column(
                children: [
                  Expanded(
                    child: charts.TimeSeriesChart(
                      series,
                      animate: true,
                      defaultRenderer: charts.LineRendererConfig(
                        includeArea: true,
                        includeLine: true,
                        includePoints: true,
                        strokeWidthPx: 1
                      ),
                      dateTimeFactory: const charts.LocalDateTimeFactory(),
                      behaviors: [
                        charts.SlidingViewport(),
                        charts.PanAndZoomBehavior(),
                        charts.SeriesLegend(
                          position: charts.BehaviorPosition.top,
                          horizontalFirst: false,
                          cellPadding: EdgeInsets.only(
                            left: 80, 
                            top: 10, 
                            bottom: 4
                          ),
                        ),
                        charts.SelectNearest(
                          eventTrigger: charts.SelectionTrigger.hover
                        ),
                        charts.LinePointHighlighter(
                          symbolRenderer: CustomCircleSymbolRenderer(size: size),
                        ),
                      ],
                      selectionModels: [
                        charts.SelectionModelConfig(
                        type: charts.SelectionModelType.info,
                        changedListener: (charts.SelectionModel model) {
                          if(model.hasDatumSelection) {
                            final tankVolumeValue = model.selectedSeries[0].measureFn(model.selectedDatum[0].index).round();
                            final dateValue = model.selectedSeries[0].domainFn(model.selectedDatum[0].index);
                            CustomCircleSymbolRenderer.value = '$dateValue 
 $tankVolumeValue L';
                        }
                      })
                    ]),
                  ),
                ],
              ),
            ),
          );

Any help would be appreciate.

question from:https://stackoverflow.com/questions/65949953/how-to-change-marker-point-size-in-charts-flutter

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...