roma.js 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. (function (root, factory) {if (typeof define === 'function' && define.amd) {
  2. // AMD. Register as an anonymous module.
  3. define(['exports', 'echarts'], factory);
  4. } else if (typeof exports === 'object' && typeof exports.nodeName !== 'string') {
  5. // CommonJS
  6. factory(exports, require('echarts'));
  7. } else {
  8. // Browser globals
  9. factory({}, root.echarts);
  10. }
  11. }(this, function (exports, echarts) {
  12. var log = function (msg) {
  13. if (typeof console !== 'undefined') {
  14. console && console.error && console.error(msg);
  15. }
  16. };
  17. if (!echarts) {
  18. log('ECharts is not Loaded');
  19. return;
  20. }
  21. var colorPalette = ['#E01F54','#001852','#f5e8c8','#b8d2c7','#c6b38e',
  22. '#a4d8c2','#f3d999','#d3758f','#dcc392','#2e4783',
  23. '#82b6e9','#ff6347','#a092f1','#0a915d','#eaf889',
  24. '#6699FF','#ff6666','#3cb371','#d5b158','#38b6b6'
  25. ];
  26. var theme = {
  27. color: colorPalette,
  28. visualMap: {
  29. color:['#e01f54','#e7dbc3'],
  30. textStyle: {
  31. color: '#333'
  32. }
  33. },
  34. candlestick: {
  35. itemStyle: {
  36. normal: {
  37. color: '#e01f54',
  38. color0: '#001852',
  39. lineStyle: {
  40. width: 1,
  41. color: '#f5e8c8',
  42. color0: '#b8d2c7'
  43. }
  44. }
  45. }
  46. },
  47. graph: {
  48. color: colorPalette
  49. },
  50. gauge : {
  51. axisLine: {
  52. lineStyle: {
  53. color: [[0.2, '#E01F54'],[0.8, '#b8d2c7'],[1, '#001852']],
  54. width: 8
  55. }
  56. }
  57. }
  58. };
  59. echarts.registerTheme('roma', theme);
  60. }));