arcbar-chart.vue 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. <template>
  2. <view class="page-box">
  3. <view class="icon-box">
  4. <view class="t-icon t-icon-xuexirenwu"></view>
  5. <view class="t-icon t-icon-ceshi"></view>
  6. <view class="t-icon t-icon-silu"></view>
  7. </view>
  8. <view class="chart-container">
  9. <view class="chart-name">
  10. <view class="t-icon t-icon-dajumao"></view>
  11. <text class="chart-name-text">排行分析</text>
  12. </view>
  13. <view class="charts-box">
  14. <qiun-data-charts type="arcbar" :chartData="chartData" :loadingType="4" :opts.title="this.chartData.series.name" />
  15. </view>
  16. </view>
  17. </view>
  18. </template>
  19. <script>
  20. export default {
  21. data() {
  22. return {
  23. chartData: {
  24. series: [{
  25. "name": "您的孩子超过",
  26. "data": 0.8,
  27. "color": "#0052d4"
  28. },
  29. {
  30. "name": "班级平均分",
  31. "data": 0.9,
  32. "color": "#ff5959"
  33. },
  34. {
  35. "name": "年纪平均分",
  36. "data": 1,
  37. "color": "#f9b248"
  38. }
  39. ],
  40. },
  41. };
  42. }
  43. }
  44. </script>
  45. <style lang="scss">
  46. .page-box{
  47. height: 400rpx;
  48. background: linear-gradient(#419eea, #f1f3f5);
  49. .icon-box{
  50. display: flex;
  51. justify-content: space-between;
  52. margin: 0 80rpx 40rpx 80rpx;
  53. padding-top: 20rpx;
  54. }
  55. .chart-container {
  56. margin: 0 20rpx;
  57. padding: 0rpx 10rpx 0rpx 0rpx;
  58. border-radius: 15rpx;
  59. display: flex;
  60. align-items: center;
  61. justify-content: center;
  62. flex-direction: column;
  63. background-color: #FFFFFF;
  64. box-shadow: 0 4rpx 8rpx rgba(0,0,0,0.1);
  65. .chart-name {
  66. width: 100%;
  67. display: flex;
  68. justify-content: flex-start;
  69. align-items: center;
  70. margin-left: 40rpx;
  71. margin-top: 20rpx;
  72. .chart-name-text {
  73. font-size: 30rpx;
  74. font-weight: bold;
  75. color: #3B4144;
  76. margin-left: 10rpx;
  77. }
  78. }
  79. .charts-box {
  80. width: 100%;
  81. height: 550rpx;
  82. }
  83. }
  84. }
  85. </style>