pie.js 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  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. export default {
  20. legend: {
  21. bottom: '5%',
  22. data: ['rose1', 'rose2', 'rose3', 'rose4']
  23. },
  24. series: [
  25. {
  26. name: '半径模式',
  27. type: 'pie',
  28. radius: [20, 80],
  29. center: ['25%', 110],
  30. label: {
  31. normal: {
  32. show: false
  33. },
  34. emphasis: {
  35. show: true
  36. }
  37. },
  38. lableLine: {
  39. normal: {
  40. show: false
  41. },
  42. emphasis: {
  43. show: true
  44. }
  45. },
  46. data: [
  47. {value: 10, name: 'rose1'},
  48. {value: 5, name: 'rose2'},
  49. {value: 15, name: 'rose3'},
  50. {value: 25, name: 'rose4'},
  51. {value: 20, name: 'rose5'},
  52. {value: 35, name: 'rose6'},
  53. {value: 30, name: 'rose7'},
  54. {value: 40, name: 'rose8'}
  55. ]
  56. },
  57. {
  58. name: '面积模式',
  59. type: 'pie',
  60. radius: [30, 80],
  61. center: ['75%', 110],
  62. roseType: 'area',
  63. labelLine: {
  64. normal: {
  65. length: 5
  66. }
  67. },
  68. data: [
  69. {value: 10, name: 'rose1'},
  70. {value: 5, name: 'rose2'},
  71. {value: 15, name: 'rose3'},
  72. {value: 25, name: 'rose4'},
  73. {value: 20, name: 'rose5'},
  74. {value: 35, name: 'rose6'},
  75. {value: 30, name: 'rose7'},
  76. {value: 40, name: 'rose8'}
  77. ]
  78. },
  79. {
  80. name: '仪表盘',
  81. type: 'gauge',
  82. radius: 100,
  83. center: ['50%', 280],
  84. detail: {formatter: '{value}%'},
  85. data: [
  86. {value: 50, name: 'Gauge'}
  87. ]
  88. }
  89. ]
  90. };