123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101 |
- <template>
- <view class="chart-container">
- <view class="chart-name">
- <view class="t-icon t-icon-xtubiao-12"></view>
- <text class="chart-name-text">目标成绩</text>
- </view>
-
- <view class="charts-box">
- <qiun-data-charts
- type="mini-bar"
- :chartData="chartData"
- :loadingType="4"
- background="none"
- :canvas2d='true' canvasId='canvans999'
- />
- </view>
- </view>
- </template>
- <script>
- export default {
- name:"bar-mini-chart",
- data() {
- return {
- chartData: {
- categories: [
- "数学",
- "语文",
- "英语",
- "体育",
- "科学",
- "思品"
- ],
- series: [{
- "name": "目标成绩",
- "data": [
- 97,
- 90,
- 100,
- 95,
- 97,
- 91
- ]
- },
- {
- "name": "近期成绩",
- "data": [
- 91,
- 92,
- 94,
- 88,
- 82,
- 89
- ]
- }
- ],
- },
-
-
- };
- }
- }
- </script>
- <style lang="scss">
- .chart-container {
- border-radius: 20rpx;
- display: flex;
- align-items: center;
- justify-content: center;
- flex-direction: column;
- background-color: #FFFFFF;
- box-shadow: 0 4rpx 8rpx rgba(0,0,0,0.05);
- width: 340rpx;
-
- .chart-name {
- display: flex;
- align-items: center;
- justify-content: flex-start;
- width: 100%;
- margin: 20rpx 0 20rpx 40rpx;
-
- .chart-name-text {
- margin-left: 20rpx;
- font-size: 30rpx;
- font-weight: bold;
- color: #3B4144;
- }
- }
- .charts-box{
- margin: 10rpx 10rpx 0 30rpx;
- width: 100%;
- height: 320rpx;
- }
- }
- .t-icon{
- width: 40rpx;
- height: 40rpx;
- }
- </style>
|