Skip to content

Commit

Permalink
fix(chart): fix radius
Browse files Browse the repository at this point in the history
  • Loading branch information
jiwangyihao committed Oct 6, 2024
1 parent 867adce commit 555c01d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions extensions/chart/src/barChart.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { defineWidget } from '@vue-motion/core'
import { onMounted, provide, ref, watchEffect } from 'vue'
import type { DateTime } from 'luxon'
import type { Growable } from '@vue-motion/lib'
import { Rect } from '@vue-motion/lib'
import { Rect as VMRect } from '@vue-motion/lib'
import type { ChartLayoutConfig } from './chartLayout.vue'
import BaseSimpleChart from './baseSimpleChart.vue'
import type { BaseChartDataSet, BaseChartOptions, BaseChartStyle, ChartStyle, Color } from '.'
Expand Down Expand Up @@ -144,7 +144,7 @@ onMounted(() => {
<!-- BarSets -->
<g v-for="(barSet, setIndex) in barSets" :key="setIndex">
<g v-for="(bar, barIndex) in barSet" :key="barIndex">
<Rect
<VMRect
:x="bar.x"
:y="bar.height < 0 ? bar.y + bar.height : bar.y"
:width="bar.width"
Expand Down
4 changes: 2 additions & 2 deletions test/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,13 @@ onMounted(() => {
<!-- <NumberPlane :ranges-x="[0, 10]" :ranges-y="[0, 10]" /> -->
<!-- </Group> -->
<BarChart :labels="['A', 'w', 'e', 'm']">
<ChartDataset label="test1">
<ChartDataset label="test1" :style="{ borderColor: '#f00', backgroundColor: '#f00' }">
<ChartData :cross="1" />
<ChartData :cross="1" />
<ChartData :cross="1" />
<ChartData :cross="1" />
</ChartDataset>
<ChartDataset label="test2">
<ChartDataset label="test2" :style="{ borderColor: '#ff0', backgroundColor: '#ff0', borderRadius: 4 }">
<ChartData :cross="2" />
<ChartData :cross="2" />
<ChartData :cross="2" />
Expand Down

0 comments on commit 555c01d

Please sign in to comment.