How to use the echarts.registerTheme function in echarts

To help you get started, we’ve selected a few 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 svenberglund / react-mst-grid-layout / src / App.js View on Github external
import GridElementGauge from './grid-elements/gridElementGauge';
import GridElementChart from './grid-elements/gridElementChart';

// This is tha guy that actually publishes data to the demo
import './worker/psWorkerRelayPublisher';

// Registering the grid-element rendering classes
GridElementColor.register("colorRender", GridElementColor);
GridElementGauge.register("gaugeRender", GridElementGauge);
GridElementChart.register("chartRender", GridElementChart);

/*
  TODO: For the elements built on echart (gauge and chart) we can use echarts built in styiling framework
  We can migrate the styles to here and make them available applciation wide, look into it...
*/
echarts.registerTheme('gauge_theme', {
    //backgroundColor: 'gray', //'#f4cccc',
    //color: 'red'
});

class App extends Component {
  render() {
    return (
      <div>
        <header>
          <p>
            This is a <a href="https://github.com/svenberglund/react-mst-grid-layout"><code>react-mst-grid-layout.js</code></a> demo!
        </p>
          
        </header>
        
      </div>
github doublechaintech / retailscm-biz-suite / bizui / src / common / Dashboard.tool.js View on Github external
import {
  ChartCard,
  MiniArea,
  MiniBar,

} from 'components/Charts';

import { PREFIX } from '../axios/tools'

import echarts from 'echarts';
import Themes from './Dashboard.echartstheme';

const {Panel} = Collapse;
//get more style from https://echarts.baidu.com/theme-builder/
echarts.registerTheme('bizTheme2', Themes.bizTheme);
//please do not use defaultTheme, this is a big trap for developers

const { hasItemCreatePermission, hasItemReadPermission } = PermissionSettingService;
const { Option } = Select;

const topColResponsiveProps = {
  xs: 8,
  sm: 6,
  md: 6,
  lg: 6,
  xl: 6,
  style: { marginBottom: 24, marginTop: 24 },
};

const wholeLineColProps = {
  xs: 24,
github ioBroker / ioBroker.docs / engine / front-end / src / Components / PieStats.js View on Github external
"markPoint": {
            "label": {
                "normal": {
                    "textStyle": {
                        "color": "#eeeeee"
                    }
                },
                "emphasis": {
                    "textStyle": {
                        "color": "#eeeeee"
                    }
                }
            }
        }
    });*/
    echarts.registerTheme('westeros', {
        "color": [
            "#3fb1e3",
            "#6be6c1",
            "#626c91",
            "#a0a7e6",
            "#c4ebad",
            "#96dee8"
        ],
        "backgroundColor": "rgba(252,252,252,0)",
        "textStyle": {},
        "title": {
            "textStyle": {
                "color": "#222"
            },
            "subtextStyle": {
                "color": "#999999"
github hyperledger / cello / src / themes / react / static / js / routes / overview / ChartCard.js View on Github external
registerTheme() {
    echarts.registerTheme('westeros', westeros)
  }
  getOptions() {
github lanux / react-admin / src / views / echarts / ThemeChartComponent.js View on Github external
registerTheme () {
    echarts.registerTheme('my_theme', {
      backgroundColor: '#0f3425',
    })
  }