@operato/scene-scichart 7.2.1 → 7.2.3
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +18 -0
- package/db.sqlite +0 -0
- package/dist/charts/ox-scichart-multiple.js +11 -4
- package/dist/charts/ox-scichart-multiple.js.map +1 -1
- package/dist/charts/ox-scichart.js +1 -1
- package/dist/charts/ox-scichart.js.map +1 -1
- package/dist/charts/scichart-builder.d.ts +5 -1
- package/dist/charts/scichart-builder.js +34 -15
- package/dist/charts/scichart-builder.js.map +1 -1
- package/logs/.08636eb59927f12972f6774f5947c8507b3564c2-audit.json +9 -9
- package/logs/.5e5d741d8b7784a2fbad65eedc0fd46946aaf6f2-audit.json +15 -0
- package/logs/{application-2024-07-31-09.log → application-2024-08-02-17.log} +8 -8
- package/logs/{application-2024-07-29-14.log → application-2024-08-02-18.log} +8 -8
- package/logs/application-2024-08-03-01.log +210 -0
- package/logs/connections-2024-08-02-17.log +50 -0
- package/logs/connections-2024-08-02-18.log +50 -0
- package/logs/connections-2024-08-03-01.log +100 -0
- package/package.json +2 -2
- package/src/charts/ox-scichart-multiple.ts +19 -10
- package/src/charts/ox-scichart.ts +1 -1
- package/src/charts/scichart-builder.ts +37 -13
- package/tsconfig.tsbuildinfo +1 -1
- package/cache/translations/system/en.json +0 -1
- package/cache/translations/system/ko.json +0 -1
- package/logs/application-2024-07-29-16.log +0 -105
@@ -25,6 +25,7 @@ import {
|
|
25
25
|
ZoomPanModifier,
|
26
26
|
ZoomExtentsModifier,
|
27
27
|
RolloverModifier,
|
28
|
+
NumericLabelProvider,
|
28
29
|
SmartDateLabelProvider,
|
29
30
|
EllipsePointMarker,
|
30
31
|
SquarePointMarker,
|
@@ -78,6 +79,16 @@ function convertColor(color: string | string[] | undefined, defaultColor?: strin
|
|
78
79
|
return tinyColor.toHex8String() || defaultColor
|
79
80
|
}
|
80
81
|
|
82
|
+
export function calculatePrecision(format: string | number = '') {
|
83
|
+
const formatString = format.toString()
|
84
|
+
|
85
|
+
if (formatString.indexOf('.') !== -1) {
|
86
|
+
return formatString.split('.')[1].length
|
87
|
+
}
|
88
|
+
|
89
|
+
return 0
|
90
|
+
}
|
91
|
+
|
81
92
|
function createPointMarker(wasmContext: any, dataset: any, color: string = DEFAULT_COLOR) {
|
82
93
|
const { pointStyle, pointRadius = POINT_MARKER_SIZE } = dataset || {}
|
83
94
|
|
@@ -115,6 +126,7 @@ function createAxis(
|
|
115
126
|
fontColor: string,
|
116
127
|
fontFamily?: string,
|
117
128
|
fontSize?: number,
|
129
|
+
precision?: number,
|
118
130
|
options?: any
|
119
131
|
) {
|
120
132
|
const { axisTitle, ticks } = axis
|
@@ -126,7 +138,8 @@ function createAxis(
|
|
126
138
|
stepSize,
|
127
139
|
beginAtZero,
|
128
140
|
color = fontColor,
|
129
|
-
textStrokeColor = fontColor
|
141
|
+
textStrokeColor = fontColor,
|
142
|
+
display
|
130
143
|
} = ticks || {}
|
131
144
|
|
132
145
|
const axisOptions = {
|
@@ -149,21 +162,32 @@ function createAxis(
|
|
149
162
|
...options
|
150
163
|
}
|
151
164
|
|
152
|
-
const labelProvider =
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
165
|
+
const labelProvider = isXAxis
|
166
|
+
? new SmartDateLabelProvider({
|
167
|
+
showWiderDateOnFirstLabel: true,
|
168
|
+
showYearOnWiderDate: false,
|
169
|
+
dateOffset: getLocalTimeOffset()
|
170
|
+
})
|
171
|
+
: new NumericLabelProvider()
|
158
172
|
|
159
|
-
|
173
|
+
if (isXAxis) {
|
174
|
+
labelProvider.cursorNumericFormat = ENumericFormat.Date_HHMMSS
|
175
|
+
} else {
|
176
|
+
labelProvider.numericFormat = ENumericFormat.Decimal
|
177
|
+
labelProvider.precision = precision || calculatePrecision(stepSize || 0.1)
|
178
|
+
labelProvider.cursorNumericFormat = ENumericFormat.NoFormat
|
179
|
+
}
|
160
180
|
|
161
181
|
return isXAxis
|
162
182
|
? new DateTimeNumericAxis(wasmContext, {
|
163
183
|
...axisOptions,
|
164
184
|
labelProvider
|
165
185
|
})
|
166
|
-
: new NumericAxis(wasmContext, {
|
186
|
+
: new NumericAxis(wasmContext, {
|
187
|
+
...axisOptions,
|
188
|
+
id: index !== 0 ? `yAxis${index}` : undefined,
|
189
|
+
labelProvider
|
190
|
+
})
|
167
191
|
}
|
168
192
|
|
169
193
|
function createSeries(
|
@@ -235,7 +259,7 @@ export async function buildSciChart(
|
|
235
259
|
config: OperatoChart.ChartConfig | undefined | null,
|
236
260
|
container: any,
|
237
261
|
{ fontSize = 14, fontFamily = 'Roboto', fontColor }: { fontSize?: number; fontFamily?: string; fontColor?: string },
|
238
|
-
grouped?: string
|
262
|
+
{ grouped, precision }: { grouped?: string; precision?: number }
|
239
263
|
): Promise<{ chart: any; dataSeries: any[] } | undefined> {
|
240
264
|
if (!config) return
|
241
265
|
|
@@ -281,7 +305,7 @@ export async function buildSciChart(
|
|
281
305
|
|
282
306
|
// Y 축 설정
|
283
307
|
;(multiAxis ? yAxes : [yAxes[0]]).forEach((axis, index) => {
|
284
|
-
const yAxis = createAxis(wasmContext, axis, index, false, fontColor, fontFamily, fontSize)
|
308
|
+
const yAxis = createAxis(wasmContext, axis, index, false, fontColor, fontFamily, fontSize, precision)
|
285
309
|
sciChartSurface.yAxes.add(yAxis)
|
286
310
|
})
|
287
311
|
|
@@ -295,7 +319,7 @@ export async function buildSciChart(
|
|
295
319
|
if (tooltip) {
|
296
320
|
const rolloverModifier = new RolloverModifier({
|
297
321
|
showTooltip: true,
|
298
|
-
showAxisLabel: true
|
322
|
+
showAxisLabel: true /* 한글의 크기를 잘 계산하지 못하므로 false */,
|
299
323
|
modifierGroup: grouped
|
300
324
|
})
|
301
325
|
|
@@ -478,7 +502,7 @@ export async function buildSciChartOverview(
|
|
478
502
|
|
479
503
|
// Y 축 설정
|
480
504
|
;(multiAxis ? yAxes : [yAxes[0]]).forEach((axis, index) => {
|
481
|
-
const yAxis = createAxis(wasmContext, axis, index, false, fontColor, fontFamily, fontSize, {
|
505
|
+
const yAxis = createAxis(wasmContext, axis, index, false, fontColor, fontFamily, fontSize, undefined, {
|
482
506
|
drawLabels: false,
|
483
507
|
drawMajorTicks: false,
|
484
508
|
drawMinorTicks: false,
|