diff --git a/core/core-frontend/src/locales/zh-CN.ts b/core/core-frontend/src/locales/zh-CN.ts
index e2cf7fa674..80ee010ff1 100644
--- a/core/core-frontend/src/locales/zh-CN.ts
+++ b/core/core-frontend/src/locales/zh-CN.ts
@@ -996,8 +996,9 @@ export default {
drag_block_value_axis_left: '左值轴',
drag_block_value_axis_right: '右值轴',
drag_block_table_data_column: '数据列',
- drag_block_pie_angel: '扇区角度',
+ drag_block_pie_angle: '扇区角度',
drag_block_pie_label: '扇区标签',
+ drag_block_pie_radius: '扇区半径',
drag_block_gauge_angel: '指针角度',
drag_block_label_value: '值',
drag_block_funnel_width: '漏斗层宽',
diff --git a/core/core-frontend/src/views/chart/components/editor/drag-label/QuotaLabel.vue b/core/core-frontend/src/views/chart/components/editor/drag-label/QuotaLabel.vue
index 89adf9a35f..ad4cc640c9 100644
--- a/core/core-frontend/src/views/chart/components/editor/drag-label/QuotaLabel.vue
+++ b/core/core-frontend/src/views/chart/components/editor/drag-label/QuotaLabel.vue
@@ -25,7 +25,7 @@ const props = defineProps({
>{{ t('chart.drag_block_value_axis') }}
{{
- t('chart.drag_block_pie_angel')
+ t('chart.drag_block_pie_angle')
}}
{{
t('chart.drag_block_funnel_width')
diff --git a/core/core-frontend/src/views/chart/components/js/panel/charts/line/line.ts b/core/core-frontend/src/views/chart/components/js/panel/charts/line/line.ts
index 5432140a63..31173be216 100644
--- a/core/core-frontend/src/views/chart/components/js/panel/charts/line/line.ts
+++ b/core/core-frontend/src/views/chart/components/js/panel/charts/line/line.ts
@@ -289,8 +289,11 @@ export class Line extends G2PlotChartView {
}
protected configLegend(chart: Chart, options: LineOptions): LineOptions {
const optionTmp = super.configLegend(chart, options)
+ if (!optionTmp.legend) {
+ return optionTmp
+ }
const xAxisExt = chart.xAxisExt[0]
- if (optionTmp.legend && xAxisExt?.customSort?.length > 0) {
+ if (xAxisExt?.customSort?.length > 0) {
// 图例自定义排序
const l = optionTmp.legend
const basicStyle = parseJson(chart.customAttr).basicStyle
@@ -303,11 +306,8 @@ export class Line extends G2PlotChartView {
marker: {
symbol: l.marker.symbol,
style: {
- r: 6,
- fill: 'rgba(0,0,0,0)',
- lineWidth: 2,
- lineJoin: 'round',
- stroke: basicStyle.colors[index % basicStyle.colors.length]
+ r: 4,
+ fill: basicStyle.colors[index % basicStyle.colors.length]
}
}
})
@@ -322,6 +322,12 @@ export class Line extends G2PlotChartView {
legend
}
}
+ optionTmp.legend.marker.style = style => {
+ return {
+ r: 5,
+ fill: style.stroke
+ }
+ }
return optionTmp
}
protected setupOptions(chart: Chart, options: LineOptions): LineOptions {
diff --git a/core/core-frontend/src/views/chart/components/js/panel/charts/pie/common.ts b/core/core-frontend/src/views/chart/components/js/panel/charts/pie/common.ts
index f328109dbd..ce8120c407 100644
--- a/core/core-frontend/src/views/chart/components/js/panel/charts/pie/common.ts
+++ b/core/core-frontend/src/views/chart/components/js/panel/charts/pie/common.ts
@@ -56,7 +56,7 @@ export const PIE_AXIS_CONFIG: AxisConfig = {
type: 'd'
},
yAxis: {
- name: `${t('chart.drag_block_pie_label')} / ${t('chart.quota')}`,
+ name: `${t('chart.drag_block_pie_angle')} / ${t('chart.quota')}`,
type: 'q',
limit: 1
}
diff --git a/core/core-frontend/src/views/chart/components/js/panel/charts/pie/rose.ts b/core/core-frontend/src/views/chart/components/js/panel/charts/pie/rose.ts
index 288b22626b..87e4a95c7a 100644
--- a/core/core-frontend/src/views/chart/components/js/panel/charts/pie/rose.ts
+++ b/core/core-frontend/src/views/chart/components/js/panel/charts/pie/rose.ts
@@ -19,12 +19,21 @@ import { valueFormatter } from '@/views/chart/components/js/formatter'
import { Datum } from '@antv/g2plot/esm/types/common'
import { add } from 'mathjs'
import isEmpty from 'lodash-es/isEmpty'
+import { useI18n } from '@/hooks/web/useI18n'
+const { t } = useI18n()
export class Rose extends G2PlotChartView {
axis: AxisType[] = PIE_AXIS_TYPE
properties: EditorProperty[] = PIE_EDITOR_PROPERTY
propertyInner: EditorPropertyInner = PIE_EDITOR_PROPERTY_INNER
- axisConfig = PIE_AXIS_CONFIG
+ axisConfig: AxisConfig = {
+ ...PIE_AXIS_CONFIG,
+ yAxis: {
+ name: `${t('chart.drag_block_pie_radius')} / ${t('chart.quota')}`,
+ type: 'q',
+ limit: 1
+ }
+ }
async drawChart(drawOptions: G2PlotDrawOptions): Promise {
const { chart, container, action } = drawOptions