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

Add Limit Line #41

Closed
Deain opened this issue Oct 8, 2019 · 1 comment
Closed

Add Limit Line #41

Deain opened this issue Oct 8, 2019 · 1 comment

Comments

@Deain
Copy link

Deain commented Oct 8, 2019

chart-intro

@dharanidharandharmasivam
Copy link
Contributor

Hi @Deain ,

Thanks for using our Syncfusion Chart Flutter widget. The limit line can be rendered using the plot band feature. We have prepared a simple sample and you can find the code snippet below to render the limit line and the text.

  SfCartesianChart(
      
      // Render text (Limit line) using the annotation feature
        annotations: <CartesianChartAnnotation>[
           CartesianChartAnnotation(
               widget: Container(
               child: const Text('Limit Line', style: TextStyle(
                 fontSize: 24,
                 fontWeight: FontWeight.bold
               ),)),
               coordinateUnit: CoordinateUnit.point,
               region: AnnotationRegion.plotArea,
               x: 'X1',
               y: 3100
            ),
        ],

        primaryYAxis: NumericAxis(
          
          // Render limit line
          plotBands: <PlotBand>[
            PlotBand(
                isVisible: true,
                start: 2980,
                end: 3020,
                shouldRenderAboveSeries: false,
                color: const Color.fromRGBO(207, 85, 7, 1))
          ],
        ),
)

To know more on the plot band, find the user guide.

Hope this helps.

Thanks,
Dharani.

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

3 participants