zzz-pc-view 0.0.119 → 0.0.121
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/index.es.js +57 -46
- package/src/index.umd.js +1 -1
- package/src/webUtils/ECharts/trendChartUtils.d.ts +8 -0
package/package.json
CHANGED
package/src/index.es.js
CHANGED
|
@@ -2976,8 +2976,8 @@ const useChartStyleConfig = (param) => {
|
|
|
2976
2976
|
// 设置图例的水平对齐位置或偏移量。如果传入的 param.legendLeft 有值,则使用该值;
|
|
2977
2977
|
// 否则,使用默认值 'center',表示图例水平居中对齐。
|
|
2978
2978
|
legendLeft: param.legendLeft ?? "center",
|
|
2979
|
-
// 图例的宽度,如果未提供则使用默认值
|
|
2980
|
-
legendWidth: param.legendWidth || 80 / 100,
|
|
2979
|
+
// 图例的宽度,如果未提供则使用默认值 80
|
|
2980
|
+
legendWidth: (param.legendWidth || 80) / 100,
|
|
2981
2981
|
// 图例的字体大小,如果未提供则使用默认值 12
|
|
2982
2982
|
legendFontSize: param.legendFontSize ?? 12,
|
|
2983
2983
|
// 图例的字体族,如果未提供则使用默认的文本字体族
|
|
@@ -3263,51 +3263,62 @@ const setYAxis$1 = (chartOption, param) => {
|
|
|
3263
3263
|
const axisName = dimension.axisName ?? "";
|
|
3264
3264
|
if (!Object.prototype.hasOwnProperty.call(axisNameIndexMap, axisName)) {
|
|
3265
3265
|
axisNameIndexMap[axisName] = yAxis.length;
|
|
3266
|
-
|
|
3267
|
-
|
|
3268
|
-
|
|
3269
|
-
|
|
3270
|
-
|
|
3271
|
-
|
|
3272
|
-
|
|
3273
|
-
|
|
3274
|
-
|
|
3275
|
-
|
|
3276
|
-
|
|
3277
|
-
|
|
3278
|
-
|
|
3279
|
-
|
|
3280
|
-
|
|
3281
|
-
|
|
3282
|
-
|
|
3283
|
-
|
|
3284
|
-
|
|
3285
|
-
|
|
3286
|
-
|
|
3266
|
+
const minMax = {};
|
|
3267
|
+
const { min, max } = dimension;
|
|
3268
|
+
if (Number.isFinite(min)) {
|
|
3269
|
+
minMax.min = min;
|
|
3270
|
+
}
|
|
3271
|
+
if (Number.isFinite(max)) {
|
|
3272
|
+
minMax.max = max;
|
|
3273
|
+
}
|
|
3274
|
+
yAxis.push(
|
|
3275
|
+
Object.assign({
|
|
3276
|
+
// Y 轴名称
|
|
3277
|
+
name: axisName,
|
|
3278
|
+
// Y 轴名称的位置
|
|
3279
|
+
nameLocation: yAxisNameLocation,
|
|
3280
|
+
// Y 轴名称的文本样式
|
|
3281
|
+
nameTextStyle: {
|
|
3282
|
+
// 轴名称字体大小
|
|
3283
|
+
fontSize: axisNameFontSize,
|
|
3284
|
+
// 轴名称字体族
|
|
3285
|
+
fontFamily: EN_TEXT_FONT_FAMILY
|
|
3286
|
+
},
|
|
3287
|
+
// Y 轴类型为数值轴
|
|
3288
|
+
type: "value",
|
|
3289
|
+
// 显示 Y 轴
|
|
3287
3290
|
show: true,
|
|
3288
|
-
//
|
|
3289
|
-
|
|
3290
|
-
|
|
3291
|
-
|
|
3292
|
-
|
|
3293
|
-
|
|
3294
|
-
|
|
3295
|
-
|
|
3296
|
-
|
|
3297
|
-
|
|
3298
|
-
|
|
3299
|
-
|
|
3300
|
-
|
|
3301
|
-
|
|
3302
|
-
//
|
|
3303
|
-
|
|
3304
|
-
|
|
3305
|
-
|
|
3306
|
-
|
|
3307
|
-
|
|
3308
|
-
|
|
3309
|
-
|
|
3310
|
-
|
|
3291
|
+
// 是否启用缩放,继承自维度配置
|
|
3292
|
+
scale: dimension.scale,
|
|
3293
|
+
// Y 轴刻度配置
|
|
3294
|
+
axisTick: {
|
|
3295
|
+
// 显示刻度
|
|
3296
|
+
show: true,
|
|
3297
|
+
// 刻度与标签对齐
|
|
3298
|
+
alignWithLabel: true
|
|
3299
|
+
},
|
|
3300
|
+
// Y 轴轴线配置
|
|
3301
|
+
axisLine: {
|
|
3302
|
+
// 显示轴线
|
|
3303
|
+
show: true
|
|
3304
|
+
},
|
|
3305
|
+
// Y 轴标签配置
|
|
3306
|
+
axisLabel: {
|
|
3307
|
+
// 标签字体大小
|
|
3308
|
+
fontSize: axisFontSize,
|
|
3309
|
+
// 标签字体族,若未提供则使用默认字体族
|
|
3310
|
+
fontFamily: dimension.labelFontFamily || NUMBER_FONT_FAMILY,
|
|
3311
|
+
// 标签格式化函数,若未提供则使用默认数字格式化函数
|
|
3312
|
+
formatter: dimension.labelFormatter || numberFormatter
|
|
3313
|
+
},
|
|
3314
|
+
// Y 轴分割线配置
|
|
3315
|
+
splitLine: {
|
|
3316
|
+
// 不显示分割线
|
|
3317
|
+
show: false
|
|
3318
|
+
}
|
|
3319
|
+
}),
|
|
3320
|
+
minMax
|
|
3321
|
+
);
|
|
3311
3322
|
}
|
|
3312
3323
|
const yAxisIndex = axisNameIndexMap[axisName];
|
|
3313
3324
|
const dimensionId = dimension.id;
|