APACHE ECHARTS
Apache ECharts, also known as Apache ECharts (incubating), is an open-source data visualization and charting library for web applications.
Prerequisites
Before you get started, ensure that you have the following prerequisites installed on your system:
npm or Yarn package manager
Vue CLI
Installation
npm install echartsInstall ECharts package from the npm registry to project's node_modules directory, and make it available for use in JavaScript code.
Define Chart Container
In Vue 3 component's template section, create a div element that will serve as the container for ECharts chart.
There are two ways to define the container:
$refs method
<div ref="echartsContainer" style="width: 100%; height: 300px;"></div>Element ID method
Access chart container
after define the container, you can now access the container in<script>
There are two ways to access chart container:
$refs method
Element ID method
Initialize an ECharts instance
Using echarts.init() method to initialize the ECharts instance and bind it to a DOM element
Define and Set the Chart Options
Examples of ECharts Usage
Example 1 : Stacked Line Chart

Example 2: Pie Chart

Example 3: Bar Chart

You can consult the Documentation in Apache ECharts Website for more advanced configurations !
Last updated