Echarts

There are few options on how to include/import Echarts into your project.

Install from NPM

Install the Echarts Js library from command prompt from the root directory of the project:

npm i vue-echarts

Import the helper function to manage the charts colors based on mode changes. It will take updated values from the root variables.

import { getColorCodes } from "../helpers/helper.js";

Below the example how to use the package and make it working ApexTree on any page.

Vue template

<template class="card-body" x-data="basicBarApp">
    <VueECharts :option="basicLineChart" :style="`height: 300px`" />
</template>

JavaScript

<script>
import VueECharts from 'vue-echarts';
import { getColorCodes } from "../helpers/helper.js";
const basicLineChart = {
  series: [
    {
      data: [150, 230, 224, 218, 135, 147, 260],
      type: "line",
    },
  ],
  color: ["#0d6efd", "#f8f9fa", "#343a40"], // Directly set colors here
  xAxis: {
    type: "category",
    data: ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"],
  },
  legend: {
    textStyle: {
      color: "#343a40", // Set color directly
    },
  },
  yAxis: {
    type: "value",
    splitLine: {
      lineStyle: {
        color: "#6B7280", // Set color directly
      },
    },
  },
  axisLine: {
    lineStyle: {
      color: "#f8f9fa", // Set color directly
    },
  },
  grid: {
    top: "5%",
    left: "6%",
    right: "0%",
    bottom: "8%",
  },
};
</script>
Receive the latest updates directly in your inbox!

Be the first to know about new updates and exclusive discounts. No spam, just great offers!

How about

A Custom Project?

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 Admin & Dashboards
230+

Total Pages

5+

Layouts

11+

Application

We provide quick support withing one business day to all of our customers.

© Domiex Created & Crafted by SRBThemes.