PineKindChart.js 975 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. // 当年防汛统计
  2. import React, { PureComponent } from "react";
  3. import Chart from "../../utils/chart";
  4. class PineKindChart extends PureComponent {
  5. constructor(props) {
  6. super(props);
  7. }
  8. getOptions() {
  9. return {
  10. color: ["#5470c6", "#91cc75", "#fac858", "#ee6666"],
  11. toolbox: {},
  12. series: [
  13. {
  14. name: "Nightingale Chart",
  15. type: "pie",
  16. radius: [16, 80],
  17. center: ["50%", "50%"],
  18. roseType: "area",
  19. itemStyle: {
  20. borderRadius: 8,
  21. },
  22. data: [
  23. { value: 40, name: "rose 1" },
  24. { value: 38, name: "rose 2" },
  25. { value: 32, name: "rose 3" },
  26. ],
  27. },
  28. ],
  29. };
  30. }
  31. render() {
  32. return (
  33. <div
  34. style={{
  35. width: "100%",
  36. height: "100%",
  37. }}
  38. >
  39. <Chart option={this.getOptions()} />
  40. </div>
  41. );
  42. } //endrender
  43. }
  44. export default PineKindChart;