How to use the vue-echarts.registerTheme function in vue-echarts

To help you get started, we’ve selected a few vue-echarts examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github yugasun / x-chart / src / components / global-components.ts View on Github external
import {
  Loading,
  Notification,
  Message,
  Tooltip,
  Select,
  Option,
} from 'element-ui';

import ECharts from 'vue-echarts';
// custom theme
import themeObj from '../themes/xuetangx.project.json';
// registering custom theme
ECharts.registerTheme(themeObj.themeName, themeObj.theme);

class GlobalComponents {
  static install(V: any): void {
    V.prototype.theme = themeObj.themeName;
    V.component('echarts', ECharts);
    V.prototype.$message = Message;
    V.prototype.$notify = Notification;

    V.use(Loading.directive);
    V.use(Tooltip);
    V.use(Select);
    V.use(Option);
  }
}

export default GlobalComponents;

vue-echarts

Vue.js component for Apache ECharts™.

MIT
Latest version published 5 days ago

Package Health Score

86 / 100
Full package analysis

Similar packages