Chart Provider is a wrapper around Highcharts that provides a consistent API for configuring an individual chart instance. This component has no visible elements and is an engineering asset only. It acts as a store for chart options and provides a context for managing chart state.
We highly recommend using our BaseChart code inside the ChartProvider to ensure that the chart is rendered correctly and state is correctly stored.
The Chart Provider accepts a single object that defines the chart to render. This can be passed either through the options
prop for supported Paste charts or through the highchartsOptions
prop to render custom charts using the full Highcharts API.
Using our supported chart options gives engineers a more streamlined and intuitive API for building various chart types. We offer a set of base configuration options shared across all charts, along with additional options specific to certain chart types. This approach simplifies the often heavily nested Highcharts API, making it easier to configure charts with clearer and more approachable property names.
For all chart configuration options you can check our code here
Below is an example where only the necessary options are deifned. More examples can be found here. To view the options available to configure this chart, references the API.
Below is an example where only the necessary options are deifned. More examples can be found here. To view the options available to configure this chart, references the API.
Below is an example where only the necessary options are deifned. More examples can be found here. To view the options available to configure this chart, references the API.
You can use the highchartsOptions
to create unsupported charts by passing the Higcharts config directly to the base chart without modification. We recommend using our wrappers for easier migration and a simpler way of accessing the rendered chart object for building custom interactions.
Compatibility
If you build charts using the Highcharts API it will be unlikely that our Paste data visualization components will function correctly as they depend on helper functions and event tracking that we enrich the default options with.