Merge pull request #13941 from dataease/pr@dev-v2@chart-t-heatmap-i18n

feat(图表): 国际化(热力图)
This commit is contained in:
jianneng-fit2cloud
2024-12-10 14:58:43 +08:00
committed by GitHub

View File

@@ -67,12 +67,12 @@ export class TableHeatmap extends G2PlotChartView<HeatmapOptions, Heatmap> {
axis: AxisType[] = ['xAxis', 'xAxisExt', 'extColor', 'filter']
axisConfig: AxisConfig = {
xAxis: {
name: `横轴 / ${t('chart.dimension')}`,
name: `${t('chart.x_axis')} / ${t('chart.dimension')}`,
type: 'd',
limit: 1
},
xAxisExt: {
name: `纵轴 / ${t('chart.dimension')}`,
name: `${t('chart.y_axis')} / ${t('chart.dimension')}`,
type: 'd',
limit: 1
},
@@ -263,7 +263,7 @@ export class TableHeatmap extends G2PlotChartView<HeatmapOptions, Heatmap> {
}
protected configXAxis(chart: Chart, options: HeatmapOptions): HeatmapOptions {
const xAxis = getXAxis(chart, options)
const xAxis = getXAxis(chart)
return {
...options,
xAxis: xAxis ? { ...xAxis, grid: null } : false
@@ -312,7 +312,7 @@ export class TableHeatmap extends G2PlotChartView<HeatmapOptions, Heatmap> {
chart.customStyle.legend.orient = 'vertical'
chart.customStyle.legend.vPosition = 'center'
chart.customStyle.legend.hPosition = 'right'
chart.customStyle.legend.rail = { defaultLength: 100 }
chart.customStyle.legend['rail'] = { defaultLength: 100 }
return chart
}