This sample illustrates lazy loading feature in chart which loads data on demand.
Lazy Load | |
Min | |
Max | |
Point Length |
In this example, you can see how to load data for the chart on demand. The chart will fire the scrollEnd
event, and in that event, we can update the chart with the required data based on the point length and axis range. The scrollbar in the chart can be customized using the height
, trackColor
, trackRadius
, scrollbarRadius
, scrollbarColor
, enableZoom
, and gripColor
properties in scrollbarSettings
.
Tooltips
are enabled in this example. To see a tooltip in action, hover over or tap on the chart.
Injecting Module
Chart component features are segregated into individual feature-wise modules. To use lazy loading need to inject ScrollBarService
and ZoomService
into the @NgModule.providers
section.