mirror of
https://github.com/dataease/dataease.git
synced 2025-02-24 19:42:56 +08:00
feat(图表): 国际化(地图类)
This commit is contained in:
parent
e2082a1fe5
commit
08d9b9b6cf
@ -1879,7 +1879,36 @@ Scatter chart (bubble) chart: {a} (series name), {b} (data name), {c} (value arr
|
||||
number_of_scales_tip: 'Expected number of axis ticks, not the final result',
|
||||
assist_line_settings: 'Auxiliary line settings',
|
||||
invalid_field: 'Invalid field',
|
||||
k_line_yaxis_tip: 'Open Price-Close Price-Low Price-High Price'
|
||||
k_line_yaxis_tip: 'Open Price-Close Price-Low Price-High Price',
|
||||
carousel_enable: 'Enable Carousel',
|
||||
carousel_stay_time: 'Stay Duration (seconds)',
|
||||
carousel_interval: 'Carousel Interval (seconds)',
|
||||
custom_tooltip_content_tip:
|
||||
"Can read field values in the form of ${'{'}fieldName{'}'} (Support HTML) ",
|
||||
legend_range_division: 'Legend range division',
|
||||
legend_equal_range: 'Equal range',
|
||||
legend_custom_range: 'Custom range',
|
||||
start_coordinates: 'Start coordinates',
|
||||
end_coordinates: 'End coordinates',
|
||||
start_name: 'Start name',
|
||||
end_name: 'End name',
|
||||
flow_map_line_width: 'Line Width',
|
||||
flow_map_line_width_tip:
|
||||
'When this metric is active, the line width property configured in the style will be overridden',
|
||||
symbolic_map_coordinates: 'Coordinates',
|
||||
symbolic_map_bubble_size_tip:
|
||||
'When this metric is active, the size property configured in the base style will be overridden. Additionally, you can configure a size range in the base style',
|
||||
point_text: 'Point Text',
|
||||
point_bubble_color: 'Point Bubble Color',
|
||||
point_bubble_size: 'Point Bubble Size',
|
||||
animation_type: 'Animation Type',
|
||||
water_wave: 'Water Wave',
|
||||
animation_speed: 'Animation Speed',
|
||||
wave_rings: 'Wave Rings',
|
||||
symbolic_map_symbol_shape: 'Symbol Shape',
|
||||
symbolic_map_symbol_shape_tip:
|
||||
'When Customizing, Supports SVG, JPG, JPEG, and PNG files up to 1MB',
|
||||
size_range: 'Size Range'
|
||||
},
|
||||
dataset: {
|
||||
scope_edit: 'only effective when editing',
|
||||
|
@ -1838,7 +1838,33 @@ export default {
|
||||
number_of_scales_tip: '期望的座標軸刻度數量,非最終結果',
|
||||
assist_line_settings: '輔助線設置',
|
||||
invalid_field: '無效欄位',
|
||||
k_line_yaxis_tip: '開盤價-收盤價-最低價-最高價'
|
||||
k_line_yaxis_tip: '開盤價-收盤價-最低價-最高價',
|
||||
carousel_enable: '開啟輪播',
|
||||
carousel_stay_time: '停留時長(秒)',
|
||||
carousel_interval: '輪播間隔(秒)',
|
||||
custom_tooltip_content_tip: "可以使用 ${'{'}fieldName{'}'} 的形式讀取欄位值(支援HTML)",
|
||||
legend_range_division: '圖例區間劃分',
|
||||
legend_equal_range: '等分區間',
|
||||
legend_custom_range: '自定義區間',
|
||||
start_coordinates: '起點經緯度',
|
||||
end_coordinates: '終點經緯度',
|
||||
start_name: '起點名稱',
|
||||
end_name: '終點名稱',
|
||||
flow_map_line_width: '線條粗細',
|
||||
flow_map_line_width_tip: '該指標生效時,樣式中線條配置的線條寬度屬性將失效',
|
||||
symbolic_map_coordinates: '經緯度',
|
||||
symbolic_map_bubble_size_tip:
|
||||
'當該指標生效時,樣式基礎樣式中的大小屬性將失效,同時可於樣式基礎樣式中的大小區間配置大小區間',
|
||||
point_text: '標注點文本',
|
||||
point_bubble_color: '標注點氣泡顏色',
|
||||
point_bubble_size: '標注點氣泡大小',
|
||||
animation_type: '動效類型',
|
||||
water_wave: '水波',
|
||||
animation_speed: '動效速率',
|
||||
wave_rings: '水波環數',
|
||||
symbolic_map_symbol_shape: '符號形狀',
|
||||
symbolic_map_symbol_shape_tip: '自訂時, 支援 1MB 以內的 SVG, JPG, JPEG, PNG 檔案',
|
||||
size_range: '大小區間'
|
||||
},
|
||||
dataset: {
|
||||
scope_edit: '僅編輯時生效',
|
||||
|
@ -1840,7 +1840,33 @@ export default {
|
||||
number_of_scales_tip: '期望的坐标轴刻度数量,非最终结果',
|
||||
assist_line_settings: '辅助线设置',
|
||||
invalid_field: '无效字段',
|
||||
k_line_yaxis_tip: '开盘价-收盘价-最低价-最高价'
|
||||
k_line_yaxis_tip: '开盘价-收盘价-最低价-最高价',
|
||||
carousel_enable: '开启轮播',
|
||||
carousel_stay_time: '停留时长(秒)',
|
||||
carousel_interval: '轮播间隔(秒)',
|
||||
custom_tooltip_content_tip: "可以${'{'}fieldName{'}'}的形式读取字段值(支持HTML)",
|
||||
legend_range_division: '图例区间划分',
|
||||
legend_equal_range: '等分区间',
|
||||
legend_custom_range: '自定义区间',
|
||||
start_coordinates: '起点经纬度',
|
||||
end_coordinates: '终点经纬度',
|
||||
start_name: '起点名称',
|
||||
end_name: '终点名称',
|
||||
flow_map_line_width: '线条粗细',
|
||||
flow_map_line_width_tip: '该指标生效时,样式中线条配置的线条宽度属性将失效',
|
||||
symbolic_map_coordinates: '经纬度',
|
||||
symbolic_map_bubble_size_tip:
|
||||
'该指标生效时,样式基础样式中的大小属性将失效,同时可在样式基础样式中的大小区间配置大小区间',
|
||||
point_text: '标注点文本',
|
||||
point_bubble_color: '标注点气泡颜色',
|
||||
point_bubble_size: '标注点气泡大小',
|
||||
animation_type: '动效类型',
|
||||
water_wave: '水波',
|
||||
animation_speed: '动效速率',
|
||||
wave_rings: '水波环数',
|
||||
symbolic_map_symbol_shape: '符号形状',
|
||||
symbolic_map_symbol_shape_tip: '自定义时, 支持 1MB 以内的 SVG, JPG, JPEG, PNG 文件',
|
||||
size_range: '大小区间'
|
||||
},
|
||||
dataset: {
|
||||
scope_edit: '仅编辑时生效',
|
||||
|
@ -93,7 +93,7 @@ init()
|
||||
style="line-height: 20px"
|
||||
:class="{ dark: 'dark' === themes }"
|
||||
>
|
||||
动效类型
|
||||
{{ t('chart.animation_type') }}
|
||||
</label>
|
||||
<el-row style="flex: 1" :gutter="8">
|
||||
<el-col :span="13">
|
||||
@ -105,7 +105,7 @@ init()
|
||||
v-model="state.bubbleAnimateForm.type"
|
||||
@change="onBubbleAnimateChange()"
|
||||
>
|
||||
<el-radio :effect="themes" label="wave"> 水波 </el-radio>
|
||||
<el-radio :effect="themes" label="wave"> {{ t('chart.water_wave') }} </el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@ -113,7 +113,9 @@ init()
|
||||
</div>
|
||||
|
||||
<div class="bubble-animate-setting">
|
||||
<label class="bubble-animate-label" :class="{ dark: 'dark' === themes }"> 动效速率 </label>
|
||||
<label class="bubble-animate-label" :class="{ dark: 'dark' === themes }">
|
||||
{{ t('chart.animation_speed') }}
|
||||
</label>
|
||||
<el-row style="flex: 1" :gutter="8">
|
||||
<el-col :span="13">
|
||||
<el-form-item class="form-item bubble-animate-slider" :class="'form-item-' + themes">
|
||||
@ -144,7 +146,9 @@ init()
|
||||
</el-row>
|
||||
</div>
|
||||
<div class="bubble-animate-setting">
|
||||
<label class="bubble-animate-label" :class="{ dark: 'dark' === themes }"> 水波环数 </label>
|
||||
<label class="bubble-animate-label" :class="{ dark: 'dark' === themes }">
|
||||
{{ t('chart.wave_rings') }}
|
||||
</label>
|
||||
<el-row style="flex: 1" :gutter="8">
|
||||
<el-col :span="13">
|
||||
<el-form-item class="form-item bubble-animate-slider" :class="'form-item-' + themes">
|
||||
|
@ -539,7 +539,7 @@ watch(
|
||||
<el-collapse-item
|
||||
:effect="themes"
|
||||
name="flowMapLineSelector"
|
||||
title="线条"
|
||||
:title="t('chart.line')"
|
||||
v-if="showProperties('flow-map-line-selector')"
|
||||
>
|
||||
<flow-map-line-selector
|
||||
|
@ -518,7 +518,7 @@ onMounted(() => {
|
||||
</el-row>
|
||||
<div class="alpha-setting">
|
||||
<label class="alpha-label" :class="{ dark: 'dark' === themes }">
|
||||
{{ t('chart.chart_map') + t('chart.map_pitch') }}
|
||||
{{ t('chart.chart_map') + ' ' + t('chart.map_pitch') }}
|
||||
</label>
|
||||
<el-row style="flex: 1" :gutter="8">
|
||||
<el-col>
|
||||
@ -577,10 +577,10 @@ onMounted(() => {
|
||||
<el-form-item class="form-item" :class="'form-item-' + themes">
|
||||
<template #label>
|
||||
<span class="data-area-label">
|
||||
<span style="margin-right: 4px">符号形状</span>
|
||||
<span style="margin-right: 4px">{{ t('chart.symbolic_map_symbol_shape') }}</span>
|
||||
<el-tooltip class="item" effect="dark" placement="bottom">
|
||||
<template v-if="state.basicStyleForm.mapSymbol === 'custom'" #content>
|
||||
<div>支持 1MB 以内的 SVG, JPG, JPEG, PNG 文件</div>
|
||||
<template #content>
|
||||
<div>{{ t('chart.symbolic_map_symbol_shape_tip') }}</div>
|
||||
</template>
|
||||
<el-icon class="hint-icon" :class="{ 'hint-icon--dark': themes === 'dark' }">
|
||||
<Icon name="icon_info_outlined"><icon_info_outlined class="svg-icon" /></Icon>
|
||||
@ -646,7 +646,7 @@ onMounted(() => {
|
||||
</div>
|
||||
<div class="alpha-setting">
|
||||
<label class="alpha-label" :class="{ dark: 'dark' === themes }">
|
||||
{{ t('chart.size') }}区间
|
||||
{{ t('chart.size_range') }}
|
||||
</label>
|
||||
<el-row style="flex: 1">
|
||||
<el-col :span="11">
|
||||
@ -810,7 +810,7 @@ onMounted(() => {
|
||||
<el-form-item
|
||||
class="form-item"
|
||||
:class="'form-item-' + themes"
|
||||
:label="t('chart.central_point') + t('chart.longitude')"
|
||||
:label="t('chart.central_point') + ' ' + t('chart.longitude')"
|
||||
>
|
||||
<el-input-number
|
||||
controls-position="right"
|
||||
@ -826,7 +826,7 @@ onMounted(() => {
|
||||
<el-form-item
|
||||
class="form-item"
|
||||
:class="'form-item-' + themes"
|
||||
:label="t('chart.central_point') + t('chart.latitude')"
|
||||
:label="t('chart.central_point') + ' ' + t('chart.latitude')"
|
||||
>
|
||||
<el-input-number
|
||||
controls-position="right"
|
||||
|
@ -116,7 +116,7 @@ onMounted(() => {
|
||||
<el-row style="flex: 1">
|
||||
<el-col>
|
||||
<el-form-item
|
||||
:label="t('chart.line') + t('chart.map_line_type')"
|
||||
:label="t('chart.line') + ' ' + t('chart.map_line_type')"
|
||||
class="form-item"
|
||||
:class="'form-item-' + themes"
|
||||
>
|
||||
@ -163,7 +163,7 @@ onMounted(() => {
|
||||
:predefine="predefineColors"
|
||||
@change="changeStyle('mapLineGradient')"
|
||||
>
|
||||
{{ t('chart.line') + t('chart.map_line_linear') }}
|
||||
{{ t('chart.line') + ' ' + t('chart.map_line_linear') }}
|
||||
</el-checkbox>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@ -268,7 +268,7 @@ onMounted(() => {
|
||||
:predefine="predefineColors"
|
||||
@change="changeStyle('mapLineAnimate')"
|
||||
>
|
||||
{{ t('chart.line') + t('chart.map_line_animate') }}
|
||||
{{ t('chart.line') + ' ' + t('chart.map_line_animate') }}
|
||||
</el-checkbox>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
@ -95,7 +95,11 @@ onMounted(() => {
|
||||
<el-form ref="pointForm" :model="state.pointForm" size="small" label-position="top">
|
||||
<div style="padding-bottom: 8px">
|
||||
<el-space>
|
||||
<el-form-item class="form-item" :class="'form-item-' + themes" label="标注点文本">
|
||||
<el-form-item
|
||||
class="form-item"
|
||||
:class="'form-item-' + themes"
|
||||
:label="t('chart.point_text')"
|
||||
>
|
||||
<el-color-picker
|
||||
:effect="themes"
|
||||
size="default"
|
||||
@ -130,7 +134,11 @@ onMounted(() => {
|
||||
</el-space>
|
||||
</div>
|
||||
<el-space>
|
||||
<el-form-item class="form-item" :class="'form-item-' + themes" label="标注点气泡颜色">
|
||||
<el-form-item
|
||||
class="form-item"
|
||||
:class="'form-item-' + themes"
|
||||
:label="t('chart.point_bubble_color')"
|
||||
>
|
||||
<el-color-picker
|
||||
:effect="themes"
|
||||
size="default"
|
||||
@ -143,7 +151,9 @@ onMounted(() => {
|
||||
</el-form-item>
|
||||
</el-space>
|
||||
<div class="alpha-setting">
|
||||
<label class="alpha-label" :class="{ dark: 'dark' === themes }"> 标注点气泡大小 </label>
|
||||
<label class="alpha-label" :class="{ dark: 'dark' === themes }">
|
||||
{{ t('chart.point_bubble_size') }}
|
||||
</label>
|
||||
<el-row style="flex: 1">
|
||||
<el-col>
|
||||
<el-form-item class="form-item alpha-slider" :class="'form-item-' + themes">
|
||||
|
@ -224,6 +224,11 @@ const changeRangeItem = (prop, index) => {
|
||||
}
|
||||
changeMisc(prop)
|
||||
}
|
||||
const getMapCustomRange = index => {
|
||||
if (index === 0) return t('chart.min')
|
||||
if (index === state.legendForm.miscForm.mapLegendNumber) return t('chart.max')
|
||||
return ''
|
||||
}
|
||||
onMounted(() => {
|
||||
init()
|
||||
})
|
||||
@ -349,7 +354,7 @@ onMounted(() => {
|
||||
:label="false"
|
||||
@change="changeMisc('mapAutoLegend')"
|
||||
>
|
||||
自定义
|
||||
{{ t('chart.custom_case') }}
|
||||
</el-radio>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@ -360,7 +365,7 @@ onMounted(() => {
|
||||
<el-form-item
|
||||
class="form-item"
|
||||
:class="'form-item-' + themes"
|
||||
label="图例区间划分"
|
||||
:label="t('chart.legend_range_division')"
|
||||
prop="miscForm.mapLegendRangeType"
|
||||
>
|
||||
<el-radio
|
||||
@ -369,9 +374,9 @@ onMounted(() => {
|
||||
v-model="state.legendForm.miscForm.mapLegendRangeType"
|
||||
:label="'quantize'"
|
||||
@change="changeLegendCustomType('mapLegendRangeType')"
|
||||
style="width: 80px"
|
||||
style="width: 75px"
|
||||
>
|
||||
等分区间
|
||||
{{ t('chart.legend_equal_range') }}
|
||||
</el-radio>
|
||||
<el-radio
|
||||
size="small"
|
||||
@ -380,7 +385,7 @@ onMounted(() => {
|
||||
:label="'custom'"
|
||||
@change="changeLegendCustomType('mapLegendRangeType')"
|
||||
>
|
||||
自定义区间
|
||||
{{ t('chart.legend_custom_range') }}
|
||||
</el-radio>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@ -413,9 +418,8 @@ onMounted(() => {
|
||||
v-for="(_value, index) in state.legendForm.miscForm.mapLegendCustomRange"
|
||||
>
|
||||
<el-col :span="8">
|
||||
<label class="ed-form-item__label">
|
||||
{{ index === 0 ? '最小值' : '' }}
|
||||
{{ index === state.legendForm.miscForm.mapLegendNumber ? '最大值' : '' }}
|
||||
<label class="ed-form-item__label text_ellipsis" :title="getMapCustomRange(index)">
|
||||
{{ getMapCustomRange(index) }}
|
||||
</label>
|
||||
</el-col>
|
||||
<el-col :span="16">
|
||||
@ -722,4 +726,11 @@ onMounted(() => {
|
||||
background: rgba(235, 235, 235, 0.15);
|
||||
}
|
||||
}
|
||||
.text_ellipsis {
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
width: 80px;
|
||||
display: inline-block !important;
|
||||
}
|
||||
</style>
|
||||
|
@ -527,7 +527,7 @@ onMounted(() => {
|
||||
</span>
|
||||
<el-tooltip class="item" :effect="toolTip" placement="bottom">
|
||||
<template #content>
|
||||
<div>可以${fieldName}的形式读取字段值(支持HTML)</div>
|
||||
<div>{{ t('chart.custom_tooltip_content_tip') }}</div>
|
||||
</template>
|
||||
<el-icon class="hint-icon" :class="{ 'hint-icon--dark': themes === 'dark' }">
|
||||
<Icon name="icon_info_outlined"><icon_info_outlined class="svg-icon" /></Icon>
|
||||
@ -852,13 +852,13 @@ onMounted(() => {
|
||||
@change="changeTooltipAttr('carousel')"
|
||||
v-model="state.tooltipForm.carousel.enable"
|
||||
>
|
||||
开启轮播
|
||||
{{ t('chart.carousel_enable') }}
|
||||
</el-checkbox>
|
||||
</el-form-item>
|
||||
<el-row :gutter="8">
|
||||
<el-col :span="12">
|
||||
<el-form-item
|
||||
label="停留时长(秒)"
|
||||
:label="t('chart.carousel_stay_time')"
|
||||
class="form-item w100"
|
||||
:class="'form-item-' + themes"
|
||||
>
|
||||
@ -877,7 +877,7 @@ onMounted(() => {
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item
|
||||
label="轮播间隔(秒)"
|
||||
:label="t('chart.carousel_interval')"
|
||||
class="form-item w100"
|
||||
:class="'form-item-' + themes"
|
||||
>
|
||||
|
@ -44,32 +44,32 @@ export class FlowMap extends L7ChartView<Scene, L7Config> {
|
||||
axis: AxisType[] = ['xAxis', 'xAxisExt', 'filter', 'flowMapStartName', 'flowMapEndName', 'yAxis']
|
||||
axisConfig: AxisConfig = {
|
||||
xAxis: {
|
||||
name: `起点经纬度 / ${t('chart.dimension')}`,
|
||||
name: `${t('chart.start_coordinates')} / ${t('chart.dimension')}`,
|
||||
type: 'd',
|
||||
limit: 2
|
||||
},
|
||||
xAxisExt: {
|
||||
name: `终点经纬度 / ${t('chart.dimension')}`,
|
||||
name: `${t('chart.end_coordinates')} / ${t('chart.dimension')}`,
|
||||
type: 'd',
|
||||
limit: 2
|
||||
},
|
||||
flowMapStartName: {
|
||||
name: `起点名称 / ${t('chart.dimension')}`,
|
||||
name: `${t('chart.start_name')} / ${t('chart.dimension')}`,
|
||||
type: 'd',
|
||||
limit: 1,
|
||||
allowEmpty: true
|
||||
},
|
||||
flowMapEndName: {
|
||||
name: `终点名称 / ${t('chart.dimension')}`,
|
||||
name: `${t('chart.end_name')} / ${t('chart.dimension')}`,
|
||||
type: 'd',
|
||||
limit: 1,
|
||||
allowEmpty: true
|
||||
},
|
||||
yAxis: {
|
||||
name: `线条粗细 / ${t('chart.quota')}`,
|
||||
name: `${t('chart.flow_map_line_width')} / ${t('chart.quota')}`,
|
||||
type: 'q',
|
||||
limit: 1,
|
||||
tooltip: '该指标生效时,样式中线条配置的线条宽度属性将失效',
|
||||
tooltip: t('chart.flow_map_line_width_tip'),
|
||||
allowEmpty: true
|
||||
}
|
||||
}
|
||||
|
@ -56,12 +56,12 @@ export class SymbolicMap extends L7ChartView<Scene, L7Config> {
|
||||
axis: AxisType[] = ['xAxis', 'xAxisExt', 'extBubble', 'filter', 'extLabel', 'extTooltip']
|
||||
axisConfig: AxisConfig = {
|
||||
xAxis: {
|
||||
name: `经纬度 / ${t('chart.dimension')}`,
|
||||
name: `${t('chart.symbolic_map_coordinates')} / ${t('chart.dimension')}`,
|
||||
type: 'd',
|
||||
limit: 2
|
||||
},
|
||||
xAxisExt: {
|
||||
name: `颜色 / ${t('chart.dimension')}`,
|
||||
name: `${t('chart.color')} / ${t('chart.dimension')}`,
|
||||
type: 'd',
|
||||
limit: 1,
|
||||
allowEmpty: true
|
||||
@ -70,8 +70,7 @@ export class SymbolicMap extends L7ChartView<Scene, L7Config> {
|
||||
name: `${t('chart.bubble_size')} / ${t('chart.quota')}`,
|
||||
type: 'q',
|
||||
limit: 1,
|
||||
tooltip:
|
||||
'该指标生效时,样式基础样式中的大小属性将失效,同时可在样式基础样式中的大小区间配置大小区间',
|
||||
tooltip: t('chart.symbolic_map_bubble_size_tip'),
|
||||
allowEmpty: true
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user