123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164 |
- (function(root, factory) {
- if (typeof define === 'function' && define.amd) {
-
- define(['exports', 'echarts'], factory);
- } else if (
- typeof exports === 'object' &&
- typeof exports.nodeName !== 'string'
- ) {
-
- factory(exports, require('echarts/lib/echarts'));
- } else {
-
- factory({}, root.echarts);
- }
- })(this, function(exports, echarts) {
- var log = function(msg) {
- if (typeof console !== 'undefined') {
- console && console.error && console.error(msg);
- }
- };
- if (!echarts) {
- log('ECharts is not Loaded');
- return;
- }
- var contrastColor = '#eee';
- var axisCommon = function() {
- return {
- axisLine: {
- lineStyle: {
- color: contrastColor
- }
- },
- axisTick: {
- lineStyle: {
- color: contrastColor
- }
- },
- axisLabel: {
- color: contrastColor
- },
- splitLine: {
- lineStyle: {
- type: 'dashed',
- color: '#aaa'
- }
- },
- splitArea: {
- areaStyle: {
- color: contrastColor
- }
- }
- };
- };
- var colorPalette = [
- '#cc0e00',
- '#ff1a0a',
- '#ff8880',
- '#ffc180',
- '#ffc2b0',
- '#ffffff',
- '#ff8880',
- '#ffe6e6'
- ];
- var theme = {
- color: colorPalette,
- backgroundColor: '#333',
- tooltip: {
- axisPointer: {
- lineStyle: {
- color: contrastColor
- },
- crossStyle: {
- color: contrastColor
- }
- }
- },
- legend: {
- textStyle: {
- color: contrastColor
- }
- },
- title: {
- textStyle: {
- color: contrastColor
- }
- },
- toolbox: {
- iconStyle: {
- borderColor: contrastColor
- }
- },
-
- dataZoom: {
- dataBackgroundColor: '#eee',
- fillerColor: 'rgba(200,200,200,0.2)',
- handleColor: '#cc0e00'
- },
- timeline: {
- itemStyle: {
- color: colorPalette[1]
- },
- lineStyle: {
- color: contrastColor
- },
- controlStyle: {
- color: contrastColor,
- borderColor: contrastColor
- },
- label: {
- color: contrastColor
- }
- },
- timeAxis: axisCommon(),
- logAxis: axisCommon(),
- valueAxis: axisCommon(),
- categoryAxis: axisCommon(),
- line: {
- symbol: 'circle'
- },
- graph: {
- color: colorPalette
- },
- gauge: {
- axisLine: {
- lineStyle: {
- color: [
- [0.2, '#ff1a0a'],
- [0.8, '#cc0e00'],
- [1, '#ffc2b0']
- ],
- width: 8
- }
- }
- }
- };
- theme.categoryAxis.splitLine.show = false;
- echarts.registerTheme('dark-mushroom', theme);
- });
|