How to show text on position chart and show Trackball auto

I want to show text on this position and show Trackball auto
my code 
SfCartesianChart(
                  enableAxisAnimation: true,
                  primaryXAxis: DateTimeAxis(
                    interval: 6,
                    edgeLabelPlacement: EdgeLabelPlacement.shift,
                    intervalType: DateTimeIntervalType.days,
                    dateFormat: DateFormat.Md(),
                  ),
                  primaryYAxis: NumericAxis(
                    decimalPlaces: 2,
                    desiredIntervals: 2,
                    labelFormat: '{value}',
                  ),
                  series: <ChartSeries<Ratedatadynamic>>[
                    LineSeries<Ratedatadynamic>(
                      dataSource: controller.chartData,
                      xValueMapper: (Ratedata sales, _) => sales.date,
                      yValueMapper: (Ratedata sales, _) => sales.mid,
                      name: 'Sales',
                      emptyPointSettings: EmptyPointSettings(
                        mode: EmptyPointMode.drop,
                      ),
                    )
                  ],
                ),
 

SfCartesianChart(
                            enableAxisAnimation: true,
                            primaryXAxis: DateTimeAxis(
                              interval: 6,
                              edgeLabelPlacement: EdgeLabelPlacement.shift,
                              intervalType: DateTimeIntervalType.days,
                              dateFormat: DateFormat.Md(),
                            ),
                            primaryYAxis: NumericAxis(
                              opposedPosition: true,
                              decimalPlaces: 2,
                              desiredIntervals: 2,
                              labelFormat: '{value}',
                              isVisible: true,
                              plotBands: <PlotBand>[
                                PlotBand(
                                    shouldRenderAboveSeries: true,
                                    isVisible: true,
                                    //isRepeatable: true,
                                    verticalTextPadding: '-35',
                                    horizontalTextPadding: '42%',
                                    text: controller.chartData[0].mid
                                        .toStringAsFixed(2),
                                    textAngle: 0,
                                    start: controller.chartData[0].mid,
                                    end: controller.chartData[0].mid,
                                    textStyle: TextStyle(
                                      //  color: Colors.white,
                                      fontSize: 16,
                                      backgroundColor: Colors.blue[800],
                                    ),
                                    borderColor: Colors.blue[800],
                                    borderWidth: 0)
                              ],
                            ),
                            series: <ChartSeries<Ratedatadynamic>>[
                              LineSeries<Ratedatadynamic>(
                                dataSource: controller.chartData,
                                xValueMapper: (Ratedata sales, _) => sales.date,
                                yValueMapper: (Ratedata sales, _) => sales.mid,
                                name: 'Sales',
                                emptyPointSettings: EmptyPointSettings(
                                  mode: EmptyPointMode.drop,
                                ),
                              )
                            ])



1 Reply 1 reply marked as answer

DP Dharanitharan Palanisamy Syncfusion Team March 18, 2021 10:52 AM UTC

Hi Pheeraphat, 
  
Greetings from Syncfusion. On analyzing the reported scenario with the provided code, we found that this is the behavior of chart. Since you have specified the interval for x-axis as 6 and after the label (3/12), the data is not added till (3/18), that is why last label not rendered. In case if you add data for (3/18) or (3/19), the last label will be visible.  
  
And for the query show trackball auto, we are not clear with your exact scenario, so kindly provide us more information on this. It will be much helpful in providing the solution sooner. To know more on trackball, find the user guide from below. 
  
  
Thanks, 
Dharanitharan. P 



Marked as answer
Loader.
Up arrow icon