We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

show tooltip for the last data

I use Syncfusion charts in my app but I need to always show a box that contains is the last information. like this image.


1 Reply

DD Dharanidharan Dharmasivam Syncfusion Team December 9, 2019 06:31 AM UTC

Hi Shvansheikha, 
 
Greetings from Syncfusion. Your requirement can be achieved using the annotation feature. We have created a sample based on your scenario in which we have displayed the y-value of last data using the annotation and you can change this based on your scenario. Find the code snippet below to achieve this, 
 
 
SfCartesianChart( 
annotations: <CartesianChartAnnotation>[ 
            CartesianChartAnnotation( 
                widget: Container( 
                   child: Text( 
                      chartData[chartData.length - 1].sales.toString(), 
                    )), 
                coordinateUnit: CoordinateUnit.logicalPixel, 
                region: AnnotationRegion.plotArea, 
                x: 300, 
                y: 20), 
          ], 
            // Other configurations 
            ) 
 
 
 
 
For more information on annotation, find the user guide. 
 
Hope this helps. 
 
Thanks, 
Dharani. 


Loader.
Live Chat Icon For mobile
Up arrow icon