roma.js 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. /*
  2. * Licensed to the Apache Software Foundation (ASF) under one
  3. * or more contributor license agreements. See the NOTICE file
  4. * distributed with this work for additional information
  5. * regarding copyright ownership. The ASF licenses this file
  6. * to you under the Apache License, Version 2.0 (the
  7. * "License"); you may not use this file except in compliance
  8. * with the License. You may obtain a copy of the License at
  9. *
  10. * http://www.apache.org/licenses/LICENSE-2.0
  11. *
  12. * Unless required by applicable law or agreed to in writing,
  13. * software distributed under the License is distributed on an
  14. * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  15. * KIND, either express or implied. See the License for the
  16. * specific language governing permissions and limitations
  17. * under the License.
  18. */
  19. (function (root, factory) {if (typeof define === 'function' && define.amd) {
  20. // AMD. Register as an anonymous module.
  21. define(['exports', 'echarts'], factory);
  22. } else if (typeof exports === 'object' && typeof exports.nodeName !== 'string') {
  23. // CommonJS
  24. factory(exports, require('echarts'));
  25. } else {
  26. // Browser globals
  27. factory({}, root.echarts);
  28. }
  29. }(this, function (exports, echarts) {
  30. var log = function (msg) {
  31. if (typeof console !== 'undefined') {
  32. console && console.error && console.error(msg);
  33. }
  34. };
  35. if (!echarts) {
  36. log('ECharts is not Loaded');
  37. return;
  38. }
  39. var colorPalette = ['#E01F54','#001852','#f5e8c8','#b8d2c7','#c6b38e',
  40. '#a4d8c2','#f3d999','#d3758f','#dcc392','#2e4783',
  41. '#82b6e9','#ff6347','#a092f1','#0a915d','#eaf889',
  42. '#6699FF','#ff6666','#3cb371','#d5b158','#38b6b6'
  43. ];
  44. var theme = {
  45. color: colorPalette,
  46. visualMap: {
  47. color:['#e01f54','#e7dbc3'],
  48. textStyle: {
  49. color: '#333'
  50. }
  51. },
  52. candlestick: {
  53. itemStyle: {
  54. normal: {
  55. color: '#e01f54',
  56. color0: '#001852',
  57. lineStyle: {
  58. width: 1,
  59. color: '#f5e8c8',
  60. color0: '#b8d2c7'
  61. }
  62. }
  63. }
  64. },
  65. graph: {
  66. color: colorPalette
  67. },
  68. gauge : {
  69. axisLine: {
  70. lineStyle: {
  71. color: [[0.2, '#E01F54'],[0.8, '#b8d2c7'],[1, '#001852']],
  72. width: 8
  73. }
  74. }
  75. }
  76. };
  77. echarts.registerTheme('roma', theme);
  78. }));