Skip to content

This sample demonstrate how to show or hide zooming toolbar items in UWP Chart.

Notifications You must be signed in to change notification settings

SyncfusionExamples/How-to-show-or-hide-zooming-toolbar-items-in-UWP-Chart

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 

Repository files navigation

How-to-show-or-hide-zooming-toolbar-items-in-UWP-Chart

This sample demonstrate how to show or hide zooming toolbar items in UWP Chart.

The UWP SfChart Zooming Toolbar encompassed some buttons for performing actions like Zoom In/Out, Resetting, and selection zooming by using the ToolBarItems property.

You can show or hide the zooming toolbar by using the EnableZoomingToolBar property in the ChartZoomPanBehavior as per the following code snippet.

[XAML]

<chart:SfChart>
  <chart:SfChart.PrimaryAxis>
      <chart:DateTimeAxis LabelFormat="MMM, yyyy"/>
  </chart:SfChart.PrimaryAxis>

      <chart:SfChart.SecondaryAxis>
          <chart:NumericalAxis />
      </chart:SfChart.SecondaryAxis>

      <chart:SfChart.Behaviors>
          <chart:ChartZoomPanBehavior ToolBarItems="ZoomIn,ZoomOut,SelectZooming"
                                      EnableZoomingToolBar="True" 
                                      EnableSelectionZooming="True" />
      </chart:SfChart.Behaviors>


      <chart:FastLineSeries ItemsSource="{Binding Data}"
                            XBindingPath="Date"
                            YBindingPath="Load"/>
      </chart:SfChart>

Output:

Show or hide zooming toolbar items in UWP Chart

Troubleshooting

Path too long exception

If you are facing path too long exception when building this example project, close Visual Studio and rename the repository to short and build the project.

Knowledge base

KB article:How to show or hide zooming toolbar items in UWP Chart?

Releases

No releases published

Packages

No packages published

Contributors 5

Languages