ODS Charts
Powerful and feature-packed frontend toolkit. ODS Charts is based on Apache Echarts, Orange branded and ergonomic charts library.
npm i ods-charts@0.2.0 echarts
Currently v0.2.0
All releasesPowerful and feature-packed frontend toolkit. ODS Charts is based on Apache Echarts, Orange branded and ergonomic charts library.
npm i ods-charts@0.2.0 echarts
Currently v0.2.0
All releasesHere are the main functionalities of ODS Charts.
Get started with Apache Echarts and ODS Charts easily.
Install Apache Echarts and ODS Charts via npm, or yarn.
npm install ods-charts@0.2.0 echarts
yarn add ods-charts@0.2.0 echarts
ODS Charts has been designed to be minimally intrusive and not to interfere with the use of the Apache ECharts library. The Apache ECharts documentation remains the reference for configuring charts.
For instance, an Apache ECharts user can initialize a chart using code like this:
var div = document.getElementById('barLine_chart');
var myChart = echarts.init(div, undefined, {
renderer: 'svg', // SVG is recommended
});
// display the chart.
myChart.setOption(dataOptions);
Adding the theme managed by ODS Charts will then consist of doing:
// build the theme
var themeManager = ODSCharts.getThemeManager({
// options can be used for configuration
});
// register this theme to echarts
echarts.registerTheme(themeManager.name, themeManager.theme);
var div = document.getElementById('barLine_chart');
var myChart = echarts.init(
div,
themeManager.name, // initialize the chart with the generated theme
{
renderer: 'svg', // SVG renderer is recommended
}
);
// enrich data options to complete implementation of the Orange Design System.
myChart.setOption(themeManager.getChartOptions(dataOptions));
The themeManager
returned by getThemeManager()
can be used to add other features supported by the ODS Charts library.