hfn-components 0.2.9 → 0.3.0

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.
@@ -51,6 +51,10 @@ export declare const HtChart: import("hfn-components/es/utils").SFCWithInstall<i
51
51
  readonly type: BooleanConstructor;
52
52
  readonly default: true;
53
53
  };
54
+ readonly auxiliaryData: {
55
+ readonly type: ObjectConstructor;
56
+ readonly default: null;
57
+ };
54
58
  readonly downLoadAutn: {
55
59
  readonly type: BooleanConstructor;
56
60
  readonly default: false;
@@ -74,6 +78,7 @@ export declare const HtChart: import("hfn-components/es/utils").SFCWithInstall<i
74
78
  readonly tooltipUnit: string;
75
79
  readonly watchResize: boolean;
76
80
  readonly showLegend: boolean;
81
+ readonly auxiliaryData: Record<string, any>;
77
82
  readonly downLoadAutn: boolean;
78
83
  readonly lineColor: string[];
79
84
  } & {}>;
@@ -142,6 +147,10 @@ export declare const HtChart: import("hfn-components/es/utils").SFCWithInstall<i
142
147
  readonly type: BooleanConstructor;
143
148
  readonly default: true;
144
149
  };
150
+ readonly auxiliaryData: {
151
+ readonly type: ObjectConstructor;
152
+ readonly default: null;
153
+ };
145
154
  readonly downLoadAutn: {
146
155
  readonly type: BooleanConstructor;
147
156
  readonly default: false;
@@ -164,6 +173,7 @@ export declare const HtChart: import("hfn-components/es/utils").SFCWithInstall<i
164
173
  readonly tooltipUnit: string;
165
174
  readonly watchResize: boolean;
166
175
  readonly showLegend: boolean;
176
+ readonly auxiliaryData: Record<string, any>;
167
177
  readonly downLoadAutn: boolean;
168
178
  readonly lineColor: string[];
169
179
  }, {}>> & Record<string, any>;
@@ -53,6 +53,10 @@ export declare const chartProps: {
53
53
  readonly type: BooleanConstructor;
54
54
  readonly default: true;
55
55
  };
56
+ readonly auxiliaryData: {
57
+ readonly type: ObjectConstructor;
58
+ readonly default: null;
59
+ };
56
60
  readonly downLoadAutn: {
57
61
  readonly type: BooleanConstructor;
58
62
  readonly default: false;
@@ -63,6 +63,11 @@ const chartProps = {
63
63
  type: Boolean,
64
64
  default: true
65
65
  },
66
+ //堆叠辅助数据
67
+ auxiliaryData: {
68
+ type: Object,
69
+ default: null
70
+ },
66
71
  //数据下载
67
72
  downLoadAutn: {
68
73
  type: Boolean,
@@ -58,6 +58,10 @@ declare const _default: import("vue").DefineComponent<{
58
58
  readonly type: BooleanConstructor;
59
59
  readonly default: true;
60
60
  };
61
+ readonly auxiliaryData: {
62
+ readonly type: ObjectConstructor;
63
+ readonly default: null;
64
+ };
61
65
  readonly downLoadAutn: {
62
66
  readonly type: BooleanConstructor;
63
67
  readonly default: false;
@@ -81,6 +85,7 @@ declare const _default: import("vue").DefineComponent<{
81
85
  readonly tooltipUnit: string;
82
86
  readonly watchResize: boolean;
83
87
  readonly showLegend: boolean;
88
+ readonly auxiliaryData: Record<string, any>;
84
89
  readonly downLoadAutn: boolean;
85
90
  readonly lineColor: string[];
86
91
  } & {}>;
@@ -149,6 +154,10 @@ declare const _default: import("vue").DefineComponent<{
149
154
  readonly type: BooleanConstructor;
150
155
  readonly default: true;
151
156
  };
157
+ readonly auxiliaryData: {
158
+ readonly type: ObjectConstructor;
159
+ readonly default: null;
160
+ };
152
161
  readonly downLoadAutn: {
153
162
  readonly type: BooleanConstructor;
154
163
  readonly default: false;
@@ -171,6 +180,7 @@ declare const _default: import("vue").DefineComponent<{
171
180
  readonly tooltipUnit: string;
172
181
  readonly watchResize: boolean;
173
182
  readonly showLegend: boolean;
183
+ readonly auxiliaryData: Record<string, any>;
174
184
  readonly downLoadAutn: boolean;
175
185
  readonly lineColor: string[];
176
186
  }, {}>;
@@ -17,6 +17,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
17
17
  watch(
18
18
  () => props.chartData,
19
19
  (val) => {
20
+ console.log(val);
20
21
  echartOptions.series = cloneDeep(val);
21
22
  drawGraph();
22
23
  },
@@ -66,6 +66,7 @@ const setEchartXAxis = (options, type, xAxisData) => {
66
66
  options.xAxis = {
67
67
  type,
68
68
  data: xAxis,
69
+ boundaryGap: false,
69
70
  axisTick: {
70
71
  alignWithLabel: true
71
72
  }
@@ -138,6 +139,11 @@ const setEchartTooltip = (options, props) => {
138
139
  html += `<span style='color:${params[i].color}'>
139
140
  ${params[i].seriesName}</span>\uFF1A${params[i].value[1].toFixed(2)}%
140
141
  `;
142
+ } else if (props.chartType === "category") {
143
+ console.log(props.auxiliaryData);
144
+ html += `<span style='color:${params[i].color}'>
145
+ ${params[i].seriesName}</span>\uFF1A${props.auxiliaryData[params[i].seriesName][params[0].name]}(${params[i].value || params[i].value === 0 ? Number(params[i].value).toFixed(props.floatNumber) : ""}%)
146
+ `;
141
147
  } else {
142
148
  html += `<span style='color:${params[i].color}'>${params[i].seriesName}</span>\uFF1A${params[i].value[2]?.toFixed(props.floatNumber)}\uFF08${params[i].value[1] > 0 ? "+" : ""}${params[i].value[1]}%\uFF09`;
143
149
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hfn-components",
3
- "version": "0.2.9",
3
+ "version": "0.3.0",
4
4
  "description": "",
5
5
  "main": "index.ts",
6
6
  "module": "es/index.mjs",