There are few options on how to include/import Echarts into your project.
Install the Echarts Js library using command prompt from the root directory of the project:
npm install echarts --save
How to Import Echarts package?
import * as echarts from 'echarts';
Check the below example how to use and make it working Echarts on any page.
HTML
<div id="basicBarChart" class="h-80" dir="ltr"></div>
JavaScript
import * as echarts from 'echarts'; //basic bar var option; option = { series: [ { data: [120, 200, 150, 80, 70, 110, 130], type: 'bar' } ], xAxis: { type: 'category', data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'], axisLabel: { color: "--dx-secondary-color" } }, legend: { textStyle: { color: "--dx-body-color" } }, yAxis: { type: 'value', splitLine: { lineStyle: { color: ["--dx-border-color"] } }, axisLabel: { color: "--dx-secondary-color" } }, axisLine: { lineStyle: { color: ["--dx-border-color"] } }, color: "--dx-primary", grid: { top: '5%', left: '6%', right: '0%', bottom: '8%', } }; allCharts.push([{ 'id': 'basicBarChart', 'data': option }]);
Be the first to know about new updates and exclusive discounts. No spam, just great offers!
How about
With over 7 years of experienced team, we specialize in delivering custom projects for startups, blue-chip companies, and government agencies. We have successfully completed over 250+ projects, providing tailored solutions that meet the unique needs of each client.
Hire Us© Domiex Created & Crafted by SRBThemes.