waveform-analysis 0.1.72 → 0.1.74

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.
Files changed (39) hide show
  1. package/README.md +34 -13
  2. package/dist/index.cjs +2 -2
  3. package/dist/index.js +2635 -2547
  4. package/dist/style.css +1 -1
  5. package/dist/types/components/annotation/useWaveformChartAnnotations.d.ts +0 -1
  6. package/dist/types/components/core/layout.d.ts +4 -2
  7. package/dist/types/components/core/types.d.ts +2 -0
  8. package/dist/types/components/core/useWaveformChartController.d.ts +0 -1
  9. package/dist/types/components/core/useWaveformData.d.ts +1 -0
  10. package/dist/types/components/core/yAxisPadding.d.ts +1 -1
  11. package/dist/types/components/core/yAxisTitleLayout.d.ts +1 -1
  12. package/dist/types/components/interaction/useExtremaTickViewport.d.ts +5 -0
  13. package/dist/types/components/rendering/WaveformTrackAxes.vue.d.ts +1 -0
  14. package/dist/types/data/sx2Channel.d.ts +10 -0
  15. package/dist/types/demo/types.d.ts +2 -0
  16. package/dist/types/types/chart.d.ts +4 -0
  17. package/package.json +1 -1
  18. package/src/App.vue +6 -0
  19. package/src/components/WaveformChartView.vue +0 -3
  20. package/src/components/annotation/useWaveformChartAnnotations.ts +7 -23
  21. package/src/components/controls/WaveformToolbar.vue +19 -20
  22. package/src/components/core/layout.ts +52 -26
  23. package/src/components/core/trackLayoutBuilder.ts +16 -6
  24. package/src/components/core/types.ts +2 -0
  25. package/src/components/core/useWaveformData.ts +2 -0
  26. package/src/components/core/useWaveformLayout.ts +10 -0
  27. package/src/components/core/yAxisLayoutMetrics.ts +24 -15
  28. package/src/components/core/yAxisPadding.ts +28 -8
  29. package/src/components/core/yAxisTitleLayout.ts +9 -48
  30. package/src/components/interaction/useExtremaTickViewport.ts +43 -0
  31. package/src/components/rendering/WaveformTrack.vue +1 -0
  32. package/src/components/rendering/WaveformTrackAxes.vue +18 -0
  33. package/src/components/rendering/yAxisTickVisibility.ts +77 -16
  34. package/src/data/simulatedWaveforms.ts +10 -0
  35. package/src/data/sx2Channel.ts +315 -0
  36. package/src/demo/DemoYAxisPaddingControls.vue +15 -0
  37. package/src/demo/types.ts +2 -0
  38. package/src/index.ts +1 -0
  39. package/src/types/chart.ts +4 -0
@@ -1,4 +1,5 @@
1
1
  import { sameTick } from '../core/yAxisPadding'
2
+ import { formatYAxisTickLabel } from '../core/layout'
2
3
 
3
4
  interface Box {
4
5
  left: number
@@ -23,7 +24,13 @@ function textBox(text: SVGTextElement): Box {
23
24
  y += Number(match[2])
24
25
  }
25
26
  }
26
- return { left: x - width, right: x, top: y - height / 2, bottom: y + height / 2 }
27
+ const startAligned = text.getAttribute('text-anchor') === 'start'
28
+ return {
29
+ left: startAligned ? x : x - width,
30
+ right: startAligned ? x + width : x,
31
+ top: y - height / 2,
32
+ bottom: y + height / 2,
33
+ }
27
34
  }
28
35
 
29
36
  export function labelsOverlap(a: Box, b: Box): boolean {
@@ -43,12 +50,46 @@ function strokeWidth(element: Element): number {
43
50
  return Number.parseFloat(getComputedStyle(element).strokeWidth) || 1
44
51
  }
45
52
 
53
+ function formatCompactLabels(svg: SVGSVGElement) {
54
+ svg.querySelectorAll<SVGTextElement>('text[data-axis-maximum-label]').forEach((maximum) => {
55
+ const axis = maximum.parentElement!.parentElement!
56
+ const labels = [...axis.querySelectorAll<SVGTextElement>('.tick text')]
57
+ const value = (text: SVGTextElement) =>
58
+ Number(text.parentElement!.getAttribute('data-tick-value'))
59
+ const visibleValues = labels
60
+ .filter((text) => text.getAttribute('display') !== 'none')
61
+ .map(value)
62
+ const domain: [number, number] = [
63
+ Number(axis.getAttribute('data-label-domain-min')),
64
+ Number(axis.getAttribute('data-label-domain-max')),
65
+ ]
66
+ labels.forEach((text) => {
67
+ text.textContent = formatYAxisTickLabel(
68
+ value(text),
69
+ domain,
70
+ visibleValues,
71
+ axis.getAttribute('data-label-unit') ?? undefined,
72
+ axis.getAttribute('data-y-axis-side') === 'right' ? 'right' : 'left',
73
+ )
74
+ })
75
+ })
76
+ }
77
+
46
78
  /** Apply after axes and grid are in the DOM; never feed the filtered set back into layout. */
47
79
  export function updateMaximumTickVisibility(svg: SVGSVGElement) {
48
80
  svg.querySelectorAll('[data-maximum-hidden]').forEach((el) => {
49
81
  el.removeAttribute('display')
50
82
  el.removeAttribute('data-maximum-hidden')
51
83
  })
84
+ svg.querySelectorAll('.waveform-track__axis--y .tick text').forEach((text) => {
85
+ text.removeAttribute('display')
86
+ })
87
+ formatCompactLabels(svg)
88
+ const minimumLabels = [...svg.querySelectorAll<SVGTextElement>('text[data-axis-minimum-label]')]
89
+ svg.querySelectorAll<SVGTextElement>('text[data-axis-maximum-label]').forEach((maximum) => {
90
+ const box = textBox(maximum)
91
+ if (minimumLabels.some((minimum) => labelsOverlap(box, textBox(minimum)))) hide(maximum)
92
+ })
52
93
  svg.querySelectorAll<SVGGElement>('.waveform-track__axis--y .tick').forEach((tick) => {
53
94
  const position = Number(tick.getAttribute('data-tick-y'))
54
95
  const height = Number(tick.closest('.waveform-track')?.getAttribute('data-track-height'))
@@ -56,33 +97,49 @@ export function updateMaximumTickVisibility(svg: SVGSVGElement) {
56
97
  if (sameTick(position, 0) || sameTick(position, height)) line?.setAttribute('display', 'none')
57
98
  else line?.removeAttribute('display')
58
99
  })
100
+ const minimumTicks = [...svg.querySelectorAll<SVGGElement>('.tick[data-minimum-tick]')]
59
101
  const maximumTicks = [...svg.querySelectorAll<SVGGElement>('.tick[data-maximum-tick]')]
60
102
  const labels = [...svg.querySelectorAll<SVGTextElement>('.waveform-track__axis--y .tick text')]
61
- maximumTicks.forEach((tick) => {
103
+ minimumTicks.forEach((tick) => {
104
+ const text = tick.querySelector('text')
105
+ if (!text) return
106
+ maximumTicks.forEach((maximum) => {
107
+ const other = maximum.querySelector('text')
108
+ if (other && other !== text && labelsOverlap(textBox(text), textBox(other))) hide(other)
109
+ })
110
+ })
111
+ const extremeTicks = [...new Set([...minimumTicks, ...maximumTicks])]
112
+ extremeTicks.forEach((tick) => {
62
113
  const text = tick.querySelector('text')
63
114
  const line = tick.querySelector('line')
64
115
  if (!text || !line) return
65
116
  const box = textBox(text)
66
117
  labels.forEach((other) => {
67
- if (other.parentElement?.hasAttribute('data-maximum-tick')) return
118
+ if (text.getAttribute('display') === 'none') return
119
+ if (other.getAttribute('display') === 'none') return
120
+ if (other.parentElement?.matches('[data-minimum-tick], [data-maximum-tick]')) return
121
+ if (!tick.hasAttribute('data-minimum-tick') && other.hasAttribute('data-axis-minimum-label'))
122
+ return
68
123
  if (labelsOverlap(box, textBox(other))) hide(other)
69
124
  })
70
125
  const axis = tick.parentElement!
71
126
  const value = Number(tick.getAttribute('data-tick-value'))
72
127
  const position = Number(tick.getAttribute('data-tick-y'))
73
- axis.querySelectorAll<SVGGElement>('.tick:not([data-maximum-tick])').forEach((other) => {
74
- const otherLine = other.querySelector('line')
75
- if (
76
- otherLine &&
77
- linesOverlap(
78
- position,
79
- Number(other.getAttribute('data-tick-y')),
80
- strokeWidth(line),
81
- strokeWidth(otherLine),
128
+ axis
129
+ .querySelectorAll<SVGGElement>('.tick:not([data-maximum-tick]):not([data-minimum-tick])')
130
+ .forEach((other) => {
131
+ const otherLine = other.querySelector('line')
132
+ if (
133
+ otherLine &&
134
+ linesOverlap(
135
+ position,
136
+ Number(other.getAttribute('data-tick-y')),
137
+ strokeWidth(line),
138
+ strokeWidth(otherLine),
139
+ )
82
140
  )
83
- )
84
- hide(otherLine)
85
- })
141
+ hide(otherLine)
142
+ })
86
143
  // Only the primary Y axis owns the existing horizontal grid.
87
144
  if (axis.getAttribute('data-y-axis-index') !== '0') return
88
145
  const track = axis.closest('.waveform-track')!
@@ -90,6 +147,10 @@ export function updateMaximumTickVisibility(svg: SVGSVGElement) {
90
147
  const gridY = Number(gridLine.getAttribute('y1'))
91
148
  if (linesOverlap(position, gridY, strokeWidth(line), strokeWidth(gridLine))) hide(gridLine)
92
149
  })
93
- tick.setAttribute('data-maximum-value', String(value))
150
+ if (tick.hasAttribute('data-maximum-tick'))
151
+ tick.setAttribute('data-maximum-value', String(value))
152
+ if (tick.hasAttribute('data-minimum-tick'))
153
+ tick.setAttribute('data-minimum-value', String(value))
94
154
  })
155
+ formatCompactLabels(svg)
95
156
  }
@@ -1,5 +1,6 @@
1
1
  import type { WaveformData, WaveformPoint, WaveformSeries } from '../types'
2
2
  import { recordedDampedPoints } from './recordedDampedWaveform'
3
+ import { sx2Channel } from './sx2Channel'
3
4
 
4
5
  const POINT_COUNT = 1_000
5
6
  const START_TIME = -5
@@ -176,6 +177,15 @@ const seriesDefinitions: SimulatedSeriesDefinition[] = [
176
177
  pointType: 'none',
177
178
  signal: (time) => 6e-9 * Math.exp(-(time + 5) * 0.2) * Math.cos(TWO_PI * 0.8 * time),
178
179
  },
180
+ {
181
+ id: `recorded-${sx2Channel.chnl_id}`,
182
+ shotNo: String(sx2Channel.shot),
183
+ name: sx2Channel.chnl,
184
+ unit: sx2Channel.dat_unit,
185
+ lineType: 'linear',
186
+ pointType: 'none',
187
+ signal: sx2Channel.data.map((value, index) => [sx2Channel.time[index]!, value]),
188
+ },
179
189
  ]
180
190
 
181
191
  export function createSimulatedWaveformData(trackCount?: number): WaveformData {
@@ -0,0 +1,315 @@
1
+ // Original channel samples and timestamps, retained without resampling.
2
+ export const sx2Channel = {
3
+ chnl: 'SX2_7_01',
4
+ chnl_id: 1155,
5
+ dat_unit: 'V',
6
+ dev: 4,
7
+ shot: 13300,
8
+ time_unit: 'ms',
9
+ // prettier-ignore
10
+ data: [
11
+ 0.005035477225909801, 0.00747692072938122, 0.007171740291447293, 0.009918364232852639, 0.016021972991531186,
12
+ 0.006561379415579438, 0.008392462043183002, 0.013580529488059767, 0.01449607080186155, 0.019378957808804387,
13
+ 0.016021972991531186, 0.015411612115663331, 0.021820401312275806, 0.015106431677729404, 0.01571679255359726,
14
+ 0.012664988174257985, 0.015411612115663331, 0.016327153429465113, 0.017242694743266895, 0.01998931868467224,
15
+ 0.010223544670786566, 0.01449607080186155, 0.018158236057068677, 0.016937514305332968, 0.012664988174257985,
16
+ 0.014801251239795477, 0.018768596932936532, 0.011444266422522276, 0.004730296787975874, 0.00747692072938122,
17
+ 0.006561379415579438, 0.009613183794918712, 0.01571679255359726, 0.00869764248111693, 0.02029449912260617,
18
+ 0.01785305561913475, 0.01327534905012584, 0.016021972991531186, 0.012359807736324058, 0.010223544670786566,
19
+ 0.017547875181200823, 0.017242694743266895, 0.016937514305332968, 0.023041123064011515, 0.022735942626077588,
20
+ 0.01785305561913475, 0.019684138246738314, 0.01785305561913475, 0.017242694743266895, 0.015411612115663331,
21
+ 0.015411612115663331, 0.01571679255359726, 0.018158236057068677, 0.01327534905012584, 0.014801251239795477,
22
+ 0.007171740291447293, 0.014801251239795477, 0.014190890363927622, 0.011444266422522276, 0.016021972991531186,
23
+ 0.01205462729839013, 0.013885709925993694, 0.010528725108720494, 0.014190890363927622, 0.01571679255359726,
24
+ 0.01663233386739904, 0.011444266422522276, 0.013885709925993694, 0.01785305561913475, 0.015411612115663331,
25
+ 0.01907377737087046, 0.016327153429465113, 0.016021972991531186, 0.014801251239795477, 0.01785305561913475,
26
+ 0.019378957808804387, 0.018158236057068677, 0.017547875181200823, 0.01907377737087046, 0.018768596932936532,
27
+ 0.01998931868467224, 0.01785305561913475, 0.018768596932936532, 0.02029449912260617, 0.01998931868467224,
28
+ 0.023956664377813297, 0.022125581750209733, 0.024567025253681152, 0.02121004043640795, 0.027313649195086498,
29
+ 0.023346303501945442, 0.024567025253681152, 0.023041123064011515, 0.027313649195086498, 0.021515220874341878,
30
+ 0.023041123064011515, 0.02700846875715257, 0.02944991226062399, 0.029755092698557917, 0.028534370946822207,
31
+ 0.030975814450293626, 0.03189135576409541, 0.03433279926756683, 0.034637979705500754, 0.03158617532616148,
32
+ 0.0340276188296329, 0.03250171663996326, 0.031280994888227553, 0.036774242771038246, 0.0373846036469061,
33
+ 0.03189135576409541, 0.0306706340123597, 0.033417257953765045, 0.03372243839169897, 0.032196536202029336,
34
+ 0.0306706340123597, 0.035858701457236464, 0.035553521019302536, 0.030060273136491844, 0.03372243839169897,
35
+ 0.03372243839169897, 0.0306706340123597, 0.03036545357442577, 0.03189135576409541, 0.031280994888227553,
36
+ 0.03280689707789719, 0.03433279926756683, 0.033417257953765045, 0.031280994888227553, 0.028534370946822207,
37
+ 0.027618829633020425, 0.03433279926756683, 0.03250171663996326, 0.03250171663996326, 0.030975814450293626,
38
+ 0.033417257953765045, 0.03250171663996326, 0.030975814450293626, 0.02944991226062399, 0.037994964522773955,
39
+ 0.03433279926756683, 0.03158617532616148, 0.028534370946822207, 0.03768978408484003, 0.03494316014343468,
40
+ 0.0306706340123597, 0.029755092698557917, 0.03372243839169897, 0.035553521019302536, 0.030975814450293626,
41
+ 0.037994964522773955, 0.03646906233310432, 0.034637979705500754, 0.03372243839169897, 0.03768978408484003,
42
+ 0.033417257953765045, 0.03372243839169897, 0.03280689707789719, 0.037994964522773955, 0.040436408026245374,
43
+ 0.037994964522773955, 0.03158617532616148, 0.03616388189517039, 0.03860532539864181, 0.034637979705500754,
44
+ 0.03189135576409541, 0.04104676890211323, 0.03524834058136861, 0.0373846036469061, 0.030975814450293626,
45
+ 0.04165712977798108, 0.03372243839169897, 0.033417257953765045, 0.04318303196765072, 0.04013122758831145,
46
+ 0.037994964522773955, 0.03616388189517039, 0.03830014496070788, 0.03768978408484003, 0.039215686274509665,
47
+ 0.035858701457236464, 0.04196231021591501, 0.036774242771038246, 0.03707942320897217, 0.04226749065384894,
48
+ 0.03830014496070788, 0.03891050583657574, 0.0407415884641793, 0.04196231021591501, 0.03860532539864181,
49
+ 0.03891050583657574, 0.0440985732814525, 0.04440375371938643, 0.039215686274509665, 0.03860532539864181,
50
+ 0.045929655909056066, 0.04440375371938643, 0.0407415884641793, 0.03768978408484003, 0.045014114595254284,
51
+ 0.03982604715037752, 0.041351949340047156, 0.039215686274509665, 0.04684519722285785, 0.03646906233310432,
52
+ 0.03311207751583112, 0.03311207751583112, 0.0440985732814525, 0.03616388189517039, 0.03891050583657574,
53
+ 0.03494316014343468, 0.0440985732814525, 0.039215686274509665, 0.03280689707789719, 0.033417257953765045,
54
+ 0.04348821240558465, 0.03860532539864181, 0.03433279926756683, 0.03524834058136861, 0.034637979705500754,
55
+ 0.04196231021591501, 0.03891050583657574, 0.027618829633020425, 0.03646906233310432, 0.04531929503318821,
56
+ 0.03830014496070788, 0.032196536202029336, 0.03494316014343468, 0.03158617532616148, 0.04165712977798108,
57
+ 0.035553521019302536, 0.03311207751583112, 0.03830014496070788, 0.034637979705500754, 0.03311207751583112,
58
+ 0.035553521019302536, 0.042572671091782865, 0.03280689707789719, 0.032196536202029336, 0.03372243839169897,
59
+ 0.037994964522773955, 0.0340276188296329, 0.028534370946822207, 0.02700846875715257, 0.035553521019302536,
60
+ 0.03189135576409541, 0.026398107881284716, 0.030060273136491844, 0.03860532539864181, 0.03158617532616148,
61
+ 0.02700846875715257, 0.02700846875715257, 0.03707942320897217, 0.028839551384756135, 0.021820401312275806,
62
+ 0.028839551384756135, 0.036774242771038246, 0.03189135576409541, 0.029755092698557917, 0.02365148393987937,
63
+ 0.029144731822690062, 0.027313649195086498, 0.023956664377813297, 0.02578774700541686, 0.031280994888227553,
64
+ 0.027618829633020425, 0.02609292744335079, 0.025482566567482934, 0.025177386129549006, 0.02365148393987937,
65
+ 0.02365148393987937, 0.026398107881284716, 0.022125581750209733, 0.02121004043640795, 0.027924010070954353,
66
+ 0.021515220874341878, 0.021515220874341878, 0.02029449912260617, 0.01785305561913475, 0.024567025253681152,
67
+ 0.021515220874341878, 0.025177386129549006, 0.02243076218814366, 0.023346303501945442, 0.021820401312275806,
68
+ 0.02243076218814366, 0.016937514305332968, 0.023956664377813297, 0.022125581750209733, 0.022735942626077588,
69
+ 0.023041123064011515, 0.018768596932936532, 0.022735942626077588, 0.02487220569161508, 0.021515220874341878,
70
+ 0.022735942626077588, 0.019684138246738314, 0.02365148393987937, 0.02243076218814366, 0.018768596932936532,
71
+ 0.022735942626077588, 0.02609292744335079, 0.016937514305332968, 0.023956664377813297, 0.028839551384756135,
72
+ 0.021515220874341878, 0.024567025253681152, 0.026398107881284716, 0.028534370946822207, 0.03433279926756683,
73
+ 0.03860532539864181, 0.035553521019302536, 0.03158617532616148, 0.03189135576409541, 0.03189135576409541,
74
+ 0.03189135576409541, 0.035858701457236464, 0.03311207751583112, 0.028839551384756135, 0.026398107881284716,
75
+ 0.02609292744335079, 0.03189135576409541, 0.024567025253681152, 0.020904859998474024, 0.02243076218814366,
76
+ 0.030975814450293626, 0.025177386129549006, 0.02121004043640795, 0.018158236057068677, 0.02243076218814366,
77
+ 0.025482566567482934, 0.01998931868467224, 0.020599679560540096, 0.02029449912260617, 0.021515220874341878,
78
+ 0.02487220569161508, 0.02121004043640795, 0.02365148393987937, 0.027924010070954353, 0.019684138246738314,
79
+ 0.019684138246738314, 0.021515220874341878, 0.027618829633020425, 0.01907377737087046, 0.022125581750209733,
80
+ 0.017242694743266895, 0.020904859998474024, 0.019684138246738314, 0.02700846875715257, 0.021515220874341878,
81
+ 0.02487220569161508, 0.019684138246738314, 0.021820401312275806, 0.025177386129549006, 0.021820401312275806,
82
+ 0.02029449912260617, 0.01998931868467224, 0.01907377737087046, 0.021515220874341878, 0.026703288319218643,
83
+ 0.02578774700541686, 0.019684138246738314, 0.022735942626077588, 0.028839551384756135, 0.021515220874341878,
84
+ 0.02365148393987937, 0.02578774700541686, 0.03189135576409541, 0.025177386129549006, 0.02121004043640795,
85
+ 0.018768596932936532, 0.0340276188296329, 0.026398107881284716, 0.031280994888227553, 0.03311207751583112,
86
+ 0.02944991226062399, 0.035858701457236464, 0.028534370946822207, 0.027313649195086498, 0.023346303501945442,
87
+ 0.023346303501945442, 0.021820401312275806, 0.022735942626077588, 0.018463416495002605, 0.027618829633020425,
88
+ 0.018768596932936532, 0.032196536202029336, 0.027313649195086498, 0.029144731822690062, 0.023346303501945442,
89
+ 0.031280994888227553, 0.024567025253681152, 0.025177386129549006, 0.02578774700541686, 0.026703288319218643,
90
+ 0.020599679560540096, 0.035553521019302536, 0.027618829633020425, 0.026398107881284716, 0.03036545357442577,
91
+ 0.028534370946822207, 0.03372243839169897, 0.026398107881284716, 0.032196536202029336, 0.023346303501945442,
92
+ 0.025482566567482934, 0.029144731822690062, 0.041351949340047156, 0.039215686274509665, 0.04104676890211323,
93
+ 0.03646906233310432, 0.034637979705500754, 0.031280994888227553, 0.02487220569161508, 0.036774242771038246,
94
+ 0.02944991226062399, 0.030975814450293626, 0.030975814450293626, 0.02700846875715257, 0.034637979705500754,
95
+ 0.04165712977798108, 0.05508506904707389, 0.035858701457236464, 0.04013122758831145, 0.03280689707789719,
96
+ 0.03280689707789719, 0.024567025253681152, 0.03189135576409541, 0.03433279926756683, 0.030060273136491844,
97
+ 0.027618829633020425, 0.027924010070954353, 0.049591821164263195, 0.04318303196765072, 0.04531929503318821,
98
+ 0.03646906233310432, 0.039215686274509665, 0.03616388189517039, 0.03494316014343468, 0.03311207751583112,
99
+ 0.036774242771038246, 0.03707942320897217, 0.06576638437476134, 0.06424048218509171, 0.06851300831616669,
100
+ 0.06485084306095956, 0.06454566262302563, 0.063019760433356, 0.06576638437476134, 0.063019760433356,
101
+ 0.06515602349889349, 0.062104219119554216, 0.07858396276798629, 0.0886549172198059, 0.09414816510261659,
102
+ 0.09628442816815408, 0.10391393911650226, 0.10116731517509692, 0.10360875867856834, 0.15487907225146813,
103
+ 0.16647592889295737, 0.19272144655527512, 0.2159151598382536, 0.23117418173494997, 0.25253681239032666,
104
+ 0.27267872129396586, 0.2977035172045479, 0.32181277180132817, 0.3413443198290995, 0.3935301747158011,
105
+ 0.4194705119401849, 0.45456626230258657, 0.49576562142366676, 0.5152971694514381, 0.5091935606927596,
106
+ 0.5195696955825131, 0.5644312199588004, 0.5833524071107039, 0.6095979247730217, 0.6013580529488056,
107
+ 0.6355382619974055, 0.6440833142595555, 0.6511024643320358, 0.6657511253528643, 0.7124437323567552,
108
+ 0.7100022888532838, 0.6272983901731894, 0.35294117647058876, 0.3614862287327387, 0.35965514610513516,
109
+ 0.19394216830701083, 0.14358739604791282, 0.20950637064164113, 0.2708476386663623, 0.35507743953612625,
110
+ 0.41641870756084565, 0.36942092011902083, 0.2159151598382536, 0.29373617151140685, 0.37827115281910473,
111
+ 0.3587396047913334, 0.5485618371862362, 0.18326085297932337, 0.26901655603875874, 0.45456626230258657,
112
+ 0.3486686503395138, 0.3715571831845583, 0.16983291371023057, 0.20767528801403756, 0.2070649271381697,
113
+ 0.25467307545586415, 0.2998397802700854, 0.35416189822232447, 0.3880369268329904, 0.4719615472648204,
114
+ 0.43228809033340987, 0.4673838406958115, 0.503089951934081, 0.738384069581139, 0.29373617151140685,
115
+ 0.3077744716563675, 0.3669794766155494, 0.4515144579232473, 0.4261844815747313, 0.46799420157167937,
116
+ 0.2125581750209804, 0.2531471732661945, 0.30807965209430144, 0.3971923399710082, 0.4081788357366296,
117
+ 0.46890974288548115, 0.4469367513542384, 0.4753185320820936, 0.48661020828564894, 0.5549706263828487,
118
+ 0.515907530327306, 0.34592202639810843, 0.24063477531090172, 0.30289158464942467, 0.35751888303959767,
119
+ 0.17532616159304126, 0.1545738918135342, 0.2336156252384214, 0.31418326085298, 0.33707179369802454,
120
+ 0.36057068741893694, 0.16983291371023057, 0.22995345998321426, 0.3031967650873586, 0.30502784771496216,
121
+ 0.3187609674219889, 0.4707408255130847, 0.23086900129701604, 0.21408407721065004, 0.21622034027618753,
122
+ 0.2507057297627231, 0.3358510719462888, 0.30502784771496216, 0.26718547341115517, 0.24246585793850528,
123
+ 0.19272144655527512, 0.17318989852750377, 0.22171358815899822, 0.14877546349278958, 0.12832837415121645,
124
+ 0.11001754787518081, 0.0920119020370791, 0.07949950408178807, 0.06424048218509171, 0.05508506904707389,
125
+ 0.03372243839169897, 0.06790264744029884, 0.06057831692988458, 0.043793392843518575, 0.05355916685740425,
126
+ 0.03891050583657574, 0.03189135576409541, 0.02822919050888828, 0.026703288319218643, 0.06363012130922385,
127
+ 0.035553521019302536, 0.03524834058136861, 0.026398107881284716, 0.047150377660791776, 0.0407415884641793,
128
+ 0.02944991226062399, 0.040436408026245374, 0.04165712977798108, 0.027924010070954353, 0.035858701457236464,
129
+ 0.028839551384756135, 0.047150377660791776, 0.025482566567482934, 0.018463416495002605, 0.027313649195086498,
130
+ 0.004425116350041947, 0.021515220874341878, 0.013580529488059767, 0.023346303501945442, 0.024567025253681152,
131
+ 0.02822919050888828, 0.005035477225909801, 0.03982604715037752, 0.018463416495002605, 0.05020218204013105,
132
+ 0.026398107881284716, 0.01571679255359726, 0.023041123064011515, 0.047150377660791776, 0.00869764248111693,
133
+ 0.024567025253681152, 0.021515220874341878, 0.015106431677729404, 0.013580529488059767, 0.021820401312275806,
134
+ 0.0306706340123597, 0.018768596932936532, 0.024567025253681152, 0.05569542992294174, 0.027924010070954353,
135
+ 0.0306706340123597, 0.024261844815747224, 0.026703288319218643, 0.02029449912260617, 0.02822919050888828,
136
+ 0.01327534905012584, 0.026398107881284716, 0.02578774700541686, 0.023041123064011515, 0.022735942626077588,
137
+ 0.032196536202029336, 0.023346303501945442, 0.023346303501945442, 0.029144731822690062, 0.03280689707789719,
138
+ 0.028839551384756135, 0.02822919050888828, 0.0306706340123597, 0.0306706340123597, 0.027618829633020425,
139
+ 0.024261844815747224, 0.033417257953765045, 0.023956664377813297, 0.027313649195086498, 0.026703288319218643,
140
+ 0.0340276188296329, 0.02944991226062399, 0.0306706340123597, 0.03707942320897217, 0.03036545357442577,
141
+ 0.03433279926756683, 0.02822919050888828, 0.03830014496070788, 0.03158617532616148, 0.030975814450293626,
142
+ 0.03189135576409541, 0.03646906233310432, 0.03616388189517039, 0.037994964522773955, 0.030975814450293626,
143
+ 0.028839551384756135, 0.033417257953765045, 0.02822919050888828, 0.0407415884641793, 0.030975814450293626,
144
+ 0.029755092698557917, 0.029144731822690062, 0.035553521019302536, 0.03250171663996326, 0.03189135576409541,
145
+ 0.03372243839169897, 0.03494316014343468, 0.03189135576409541, 0.0306706340123597, 0.031280994888227553,
146
+ 0.030975814450293626, 0.0306706340123597, 0.03158617532616148, 0.03372243839169897, 0.030975814450293626,
147
+ 0.029755092698557917, 0.03036545357442577, 0.03250171663996326, 0.041351949340047156, 0.03311207751583112,
148
+ 0.03158617532616148, 0.030975814450293626, 0.027924010070954353, 0.031280994888227553, 0.03189135576409541,
149
+ 0.029755092698557917, 0.03311207751583112, 0.0306706340123597, 0.028534370946822207, 0.027924010070954353,
150
+ 0.0306706340123597, 0.03280689707789719, 0.032196536202029336, 0.0340276188296329, 0.029755092698557917,
151
+ 0.027313649195086498, 0.0306706340123597, 0.028534370946822207, 0.027313649195086498, 0.032196536202029336,
152
+ 0.02944991226062399, 0.0340276188296329, 0.027618829633020425, 0.02700846875715257, 0.03311207751583112,
153
+ 0.027924010070954353, 0.027924010070954353, 0.028839551384756135, 0.027313649195086498, 0.028534370946822207,
154
+ 0.03158617532616148, 0.026703288319218643, 0.024567025253681152, 0.028839551384756135, 0.02487220569161508,
155
+ 0.025177386129549006, 0.02365148393987937, 0.020599679560540096, 0.021820401312275806, 0.01998931868467224,
156
+ 0.022125581750209733, 0.0306706340123597, 0.027618829633020425, 0.02029449912260617, 0.024567025253681152,
157
+ 0.017242694743266895, 0.01907377737087046, 0.019684138246738314, 0.016021972991531186, 0.017547875181200823,
158
+ 0.01785305561913475, 0.018158236057068677, 0.018463416495002605, 0.019378957808804387, 0.013885709925993694,
159
+ 0.011749446860456203, 0.009918364232852639, 0.01907377737087046, 0.018768596932936532, 0.019378957808804387,
160
+ 0.01571679255359726, 0.017547875181200823, 0.018768596932936532, 0.010833905546654421, 0.012970168612191912,
161
+ 0.016327153429465113, 0.016021972991531186, 0.017547875181200823, 0.012359807736324058, 0.018463416495002605,
162
+ 0.016937514305332968, 0.018463416495002605, 0.01571679255359726, 0.01449607080186155, 0.014801251239795477,
163
+ 0.01663233386739904, 0.014801251239795477, 0.015106431677729404, 0.02121004043640795, 0.014801251239795477,
164
+ 0.013580529488059767, 0.011444266422522276, 0.012359807736324058, 0.015106431677729404, 0.009918364232852639,
165
+ 0.015411612115663331, 0.015411612115663331, 0.009918364232852639, 0.010833905546654421, 0.013580529488059767,
166
+ 0.01785305561913475, 0.01907377737087046, 0.01327534905012584, 0.010528725108720494, 0.011444266422522276,
167
+ 0.011444266422522276, 0.014801251239795477, 0.013580529488059767, 0.013580529488059767, 0.014190890363927622,
168
+ 0.012359807736324058, 0.01663233386739904, 0.018463416495002605, 0.01327534905012584, 0.010528725108720494,
169
+ 0.011444266422522276, 0.010833905546654421, 0.011444266422522276, 0.01205462729839013, 0.010223544670786566,
170
+ 0.00869764248111693, 0.015411612115663331, 0.012970168612191912, 0.01449607080186155, 0.015411612115663331,
171
+ 0.01327534905012584, 0.025177386129549006, 0.004730296787975874, 0.009613183794918712, 0.013580529488059767,
172
+ 0.009308003356984784, 0.011749446860456203, 0.012359807736324058, 0.012359807736324058, 0.009613183794918712,
173
+ 0.010223544670786566, 0.01327534905012584, 0.012970168612191912, 0.01327534905012584, 0.011749446860456203,
174
+ 0.010528725108720494, 0.01205462729839013, 0.0077821011673151474, 0.010833905546654421, 0.010223544670786566,
175
+ 0.011444266422522276, 0.008087281605249075, 0.011444266422522276, 0.011139085984588348, 0.008087281605249075,
176
+ 0.0077821011673151474, 0.01327534905012584, 0.009002822919050857, 0.009308003356984784, 0.011444266422522276,
177
+ 0.010223544670786566, 0.011749446860456203, 0.009918364232852639, 0.011139085984588348, 0.011139085984588348,
178
+ 0.010528725108720494, 0.009308003356984784, 0.009918364232852639, 0.00869764248111693, 0.010223544670786566,
179
+ 0.012359807736324058, 0.015411612115663331, 0.011139085984588348, 0.011139085984588348, 0.010833905546654421,
180
+ 0.009613183794918712, 0.008392462043183002, 0.011444266422522276, 0.011749446860456203, 0.008392462043183002,
181
+ 0.008392462043183002, 0.009308003356984784, 0.015411612115663331, 0.012359807736324058, 0.011139085984588348,
182
+ 0.012970168612191912, 0.008087281605249075, 0.009918364232852639, 0.011139085984588348, 0.009918364232852639,
183
+ 0.00869764248111693, 0.010223544670786566, 0.012359807736324058, 0.014190890363927622, 0.011749446860456203,
184
+ 0.009308003356984784, 0.009613183794918712, 0.012664988174257985, 0.00869764248111693, 0.011749446860456203,
185
+ 0.01327534905012584, 0.011749446860456203, 0.008392462043183002, 0.008087281605249075, 0.011444266422522276,
186
+ 0.01205462729839013, 0.011139085984588348, 0.011139085984588348, 0.012664988174257985, 0.008087281605249075,
187
+ 0.012664988174257985, 0.012359807736324058, 0.012664988174257985, 0.011444266422522276, 0.010223544670786566,
188
+ 0.012359807736324058, 0.010833905546654421, 0.011444266422522276, 0.010223544670786566, 0.011749446860456203,
189
+ 0.01327534905012584, 0.011139085984588348, 0.015106431677729404, 0.015106431677729404, 0.011749446860456203,
190
+ 0.01205462729839013, 0.01327534905012584, 0.009613183794918712, 0.016937514305332968, 0.009613183794918712,
191
+ 0.01205462729839013, 0.013885709925993694, 0.011749446860456203, 0.01449607080186155, 0.016327153429465113,
192
+ 0.01205462729839013, 0.015106431677729404, 0.01327534905012584, 0.01449607080186155, 0.012359807736324058,
193
+ 0.009002822919050857, 0.011444266422522276, 0.01449607080186155, 0.01205462729839013, 0.013580529488059767,
194
+ 0.011444266422522276, 0.013580529488059767, 0.011749446860456203, 0.018768596932936532, 0.01571679255359726,
195
+ 0.013885709925993694, 0.012970168612191912, 0.010833905546654421, 0.012359807736324058, 0.01205462729839013,
196
+ 0.01205462729839013, 0.01205462729839013, 0.013580529488059767, 0.014801251239795477, 0.011444266422522276,
197
+ 0.014190890363927622, 0.010528725108720494, 0.014190890363927622, 0.01327534905012584, 0.013580529488059767,
198
+ 0.018158236057068677, 0.01449607080186155, 0.012359807736324058, 0.012359807736324058, 0.011139085984588348,
199
+ 0.01327534905012584, 0.013885709925993694, 0.01571679255359726, 0.012359807736324058, 0.01327534905012584,
200
+ 0.010223544670786566, 0.013580529488059767, 0.014190890363927622, 0.012970168612191912, 0.016327153429465113,
201
+ 0.018768596932936532, 0.014801251239795477, 0.012664988174257985, 0.013580529488059767, 0.01571679255359726,
202
+ 0.016327153429465113, 0.01327534905012584, 0.013885709925993694, 0.01449607080186155, 0.012970168612191912,
203
+ 0.01205462729839013, 0.019684138246738314, 0.016021972991531186, 0.016937514305332968, 0.013580529488059767,
204
+ 0.00869764248111693, 0.01205462729839013, 0.013885709925993694, 0.012970168612191912, 0.010528725108720494,
205
+ 0.012664988174257985, 0.013885709925993694, 0.012359807736324058, 0.014190890363927622, 0.01205462729839013,
206
+ 0.011444266422522276, 0.016327153429465113, 0.016937514305332968, 0.012359807736324058, 0.01571679255359726,
207
+ 0.01205462729839013, 0.011749446860456203, 0.009613183794918712, 0.010223544670786566, 0.015411612115663331,
208
+ 0.013580529488059767, 0.014801251239795477, 0.010833905546654421, 0.01205462729839013, 0.013580529488059767,
209
+ 0.01205462729839013, 0.01785305561913475, 0.012664988174257985, 0.012970168612191912, 0.015106431677729404,
210
+ 0.01449607080186155, 0.01327534905012584, 0.01327534905012584, 0.012970168612191912, 0.01327534905012584,
211
+ ],
212
+ // prettier-ignore
213
+ time: [
214
+ 0, 4, 8, 12, 16, 20, 24, 28, 32, 36,
215
+ 40, 44, 48, 52, 56, 60, 64, 68, 72, 76,
216
+ 80, 84, 88, 92, 96, 100, 104, 108, 112, 116,
217
+ 120, 124, 128, 132, 136, 140, 144, 148, 152, 156,
218
+ 160, 164, 168, 172, 176, 180, 184, 188, 192, 196,
219
+ 200, 204, 208, 212, 216, 220, 224, 228, 232, 236,
220
+ 240, 244, 248, 252, 256, 260, 264, 268, 272, 276,
221
+ 280, 284, 288, 292, 296, 300, 304, 308, 312, 316,
222
+ 320, 324, 328, 332, 336, 340, 344, 348, 352, 356,
223
+ 360, 364, 368, 372, 376, 380, 384, 388, 392, 396,
224
+ 400, 404, 408, 412, 416, 420, 424, 428, 432, 436,
225
+ 440, 444, 448, 452, 456, 460, 464, 468, 472, 476,
226
+ 480, 484, 488, 492, 496, 500, 504, 508, 512, 516,
227
+ 520, 524, 528, 532, 536, 540, 544, 548, 552, 556,
228
+ 560, 564, 568, 572, 576, 580, 584, 588, 592, 596,
229
+ 600, 604, 608, 612, 616, 620, 624, 628, 632, 636,
230
+ 640, 644, 648, 652, 656, 660, 664, 668, 672, 676,
231
+ 680, 684, 688, 692, 696, 700, 704, 708, 712, 716,
232
+ 720, 724, 728, 732, 736, 740, 744, 748, 752, 756,
233
+ 760, 764, 768, 772, 776, 780, 784, 788, 792, 796,
234
+ 800, 804, 808, 812, 816, 820, 824, 828, 832, 836,
235
+ 840, 844, 848, 852, 856, 860, 864, 868, 872, 876,
236
+ 880, 884, 888, 892, 896, 900, 904, 908, 912, 916,
237
+ 920, 924, 928, 932, 936, 940, 944, 948, 952, 956,
238
+ 960, 964, 968, 972, 976, 980, 984, 988, 992, 996,
239
+ 1000, 1004, 1008, 1012, 1016, 1020, 1024, 1028, 1032, 1036,
240
+ 1040, 1044, 1048, 1052, 1056, 1060, 1064, 1068, 1072, 1076,
241
+ 1080, 1084, 1088, 1092, 1096, 1100, 1104, 1108, 1112, 1116,
242
+ 1120, 1124, 1128, 1132, 1136, 1140, 1144, 1148, 1152, 1156,
243
+ 1160, 1164, 1168, 1172, 1176, 1180, 1184, 1188, 1192, 1196,
244
+ 1200, 1204, 1208, 1212, 1216, 1220, 1224, 1228, 1232, 1236,
245
+ 1240, 1244, 1248, 1252, 1256, 1260, 1264, 1268, 1272, 1276,
246
+ 1280, 1284, 1288, 1292, 1296, 1300, 1304, 1308, 1312, 1316,
247
+ 1320, 1324, 1328, 1332, 1336, 1340, 1344, 1348, 1352, 1356,
248
+ 1360, 1364, 1368, 1372, 1376, 1380, 1384, 1388, 1392, 1396,
249
+ 1400, 1404, 1408, 1412, 1416, 1420, 1424, 1428, 1432, 1436,
250
+ 1440, 1444, 1448, 1452, 1456, 1460, 1464, 1468, 1472, 1476,
251
+ 1480, 1484, 1488, 1492, 1496, 1500, 1504, 1508, 1512, 1516,
252
+ 1520, 1524, 1528, 1532, 1536, 1540, 1544, 1548, 1552, 1556,
253
+ 1560, 1564, 1568, 1572, 1576, 1580, 1584, 1588, 1592, 1596,
254
+ 1600, 1604, 1608, 1612, 1616, 1620, 1624, 1628, 1632, 1636,
255
+ 1640, 1644, 1648, 1652, 1656, 1660, 1664, 1668, 1672, 1676,
256
+ 1680, 1684, 1688, 1692, 1696, 1700, 1704, 1708, 1712, 1716,
257
+ 1720, 1724, 1728, 1732, 1736, 1740, 1744, 1748, 1752, 1756,
258
+ 1760, 1764, 1768, 1772, 1776, 1780, 1784, 1788, 1792, 1796,
259
+ 1800, 1804, 1808, 1812, 1816, 1820, 1824, 1828, 1832, 1836,
260
+ 1840, 1844, 1848, 1852, 1856, 1860, 1864, 1868, 1872, 1876,
261
+ 1880, 1884, 1888, 1892, 1896, 1900, 1904, 1908, 1912, 1916,
262
+ 1920, 1924, 1928, 1932, 1936, 1940, 1944, 1948, 1952, 1956,
263
+ 1960, 1964, 1968, 1972, 1976, 1980, 1984, 1988, 1992, 1996,
264
+ 2000, 2004, 2008, 2012, 2016, 2020, 2024, 2028, 2032, 2036,
265
+ 2040, 2044, 2048, 2052, 2056, 2060, 2064, 2068, 2072, 2076,
266
+ 2080, 2084, 2088, 2092, 2096, 2100, 2104, 2108, 2112, 2116,
267
+ 2120, 2124, 2128, 2132, 2136, 2140, 2144, 2148, 2152, 2156,
268
+ 2160, 2164, 2168, 2172, 2176, 2180, 2184, 2188, 2192, 2196,
269
+ 2200, 2204, 2208, 2212, 2216, 2220, 2224, 2228, 2232, 2236,
270
+ 2240, 2244, 2248, 2252, 2256, 2260, 2264, 2268, 2272, 2276,
271
+ 2280, 2284, 2288, 2292, 2296, 2300, 2304, 2308, 2312, 2316,
272
+ 2320, 2324, 2328, 2332, 2336, 2340, 2344, 2348, 2352, 2356,
273
+ 2360, 2364, 2368, 2372, 2376, 2380, 2384, 2388, 2392, 2396,
274
+ 2400, 2404, 2408, 2412, 2416, 2420, 2424, 2428, 2432, 2436,
275
+ 2440, 2444, 2448, 2452, 2456, 2460, 2464, 2468, 2472, 2476,
276
+ 2480, 2484, 2488, 2492, 2496, 2500, 2504, 2508, 2512, 2516,
277
+ 2520, 2524, 2528, 2532, 2536, 2540, 2544, 2548, 2552, 2556,
278
+ 2560, 2564, 2568, 2572, 2576, 2580, 2584, 2588, 2592, 2596,
279
+ 2600, 2604, 2608, 2612, 2616, 2620, 2624, 2628, 2632, 2636,
280
+ 2640, 2644, 2648, 2652, 2656, 2660, 2664, 2668, 2672, 2676,
281
+ 2680, 2684, 2688, 2692, 2696, 2700, 2704, 2708, 2712, 2716,
282
+ 2720, 2724, 2728, 2732, 2736, 2740, 2744, 2748, 2752, 2756,
283
+ 2760, 2764, 2768, 2772, 2776, 2780, 2784, 2788, 2792, 2796,
284
+ 2800, 2804, 2808, 2812, 2816, 2820, 2824, 2828, 2832, 2836,
285
+ 2840, 2844, 2848, 2852, 2856, 2860, 2864, 2868, 2872, 2876,
286
+ 2880, 2884, 2888, 2892, 2896, 2900, 2904, 2908, 2912, 2916,
287
+ 2920, 2924, 2928, 2932, 2936, 2940, 2944, 2948, 2952, 2956,
288
+ 2960, 2964, 2968, 2972, 2976, 2980, 2984, 2988, 2992, 2996,
289
+ 3000, 3004, 3008, 3012, 3016, 3020, 3024, 3028, 3032, 3036,
290
+ 3040, 3044, 3048, 3052, 3056, 3060, 3064, 3068, 3072, 3076,
291
+ 3080, 3084, 3088, 3092, 3096, 3100, 3104, 3108, 3112, 3116,
292
+ 3120, 3124, 3128, 3132, 3136, 3140, 3144, 3148, 3152, 3156,
293
+ 3160, 3164, 3168, 3172, 3176, 3180, 3184, 3188, 3192, 3196,
294
+ 3200, 3204, 3208, 3212, 3216, 3220, 3224, 3228, 3232, 3236,
295
+ 3240, 3244, 3248, 3252, 3256, 3260, 3264, 3268, 3272, 3276,
296
+ 3280, 3284, 3288, 3292, 3296, 3300, 3304, 3308, 3312, 3316,
297
+ 3320, 3324, 3328, 3332, 3336, 3340, 3344, 3348, 3352, 3356,
298
+ 3360, 3364, 3368, 3372, 3376, 3380, 3384, 3388, 3392, 3396,
299
+ 3400, 3404, 3408, 3412, 3416, 3420, 3424, 3428, 3432, 3436,
300
+ 3440, 3444, 3448, 3452, 3456, 3460, 3464, 3468, 3472, 3476,
301
+ 3480, 3484, 3488, 3492, 3496, 3500, 3504, 3508, 3512, 3516,
302
+ 3520, 3524, 3528, 3532, 3536, 3540, 3544, 3548, 3552, 3556,
303
+ 3560, 3564, 3568, 3572, 3576, 3580, 3584, 3588, 3592, 3596,
304
+ 3600, 3604, 3608, 3612, 3616, 3620, 3624, 3628, 3632, 3636,
305
+ 3640, 3644, 3648, 3652, 3656, 3660, 3664, 3668, 3672, 3676,
306
+ 3680, 3684, 3688, 3692, 3696, 3700, 3704, 3708, 3712, 3716,
307
+ 3720, 3724, 3728, 3732, 3736, 3740, 3744, 3748, 3752, 3756,
308
+ 3760, 3764, 3768, 3772, 3776, 3780, 3784, 3788, 3792, 3796,
309
+ 3800, 3804, 3808, 3812, 3816, 3820, 3824, 3828, 3832, 3836,
310
+ 3840, 3844, 3848, 3852, 3856, 3860, 3864, 3868, 3872, 3876,
311
+ 3880, 3884, 3888, 3892, 3896, 3900, 3904, 3908, 3912, 3916,
312
+ 3920, 3924, 3928, 3932, 3936, 3940, 3944, 3948, 3952, 3956,
313
+ 3960, 3964, 3968, 3972, 3976, 3980, 3984, 3988, 3992, 3999.999,
314
+ ],
315
+ }
@@ -24,6 +24,18 @@ const model = defineModel<DemoControlPanelModel>('model', { required: true })
24
24
  :aria-label="side === 'upper' ? '上方留白比例' : '下方留白比例'"
25
25
  />
26
26
  </div>
27
+ <div
28
+ v-for="side in ['maximum', 'minimum'] as const"
29
+ :key="side"
30
+ class="y-axis-padding-control extrema-control"
31
+ >
32
+ <span>{{ side === 'maximum' ? '显示最大值刻度' : '显示最小值刻度' }}</span>
33
+ <Switch
34
+ v-model:checked="model[`${side}TickVisible`]"
35
+ size="small"
36
+ :aria-label="side === 'maximum' ? '显示最大值刻度' : '显示最小值刻度'"
37
+ />
38
+ </div>
27
39
  <small>仅作用于自动 Y 范围;刻度取整可能增加实际留白。</small>
28
40
  </section>
29
41
  </template>
@@ -43,4 +55,7 @@ const model = defineModel<DemoControlPanelModel>('model', { required: true })
43
55
  .y-axis-padding-control :deep(.ant-input-number) {
44
56
  width: 100%;
45
57
  }
58
+ .extrema-control {
59
+ grid-template-columns: 1fr auto;
60
+ }
46
61
  </style>
package/src/demo/types.ts CHANGED
@@ -53,6 +53,8 @@ export interface DemoControlPanelModel {
53
53
  yAxisLineVisible: boolean
54
54
  upperPaddingEnabled: boolean
55
55
  lowerPaddingEnabled: boolean
56
+ maximumTickVisible: boolean
57
+ minimumTickVisible: boolean
56
58
  upperPaddingPercent: number
57
59
  lowerPaddingPercent: number
58
60
  xAxisLabelFormatterEnabled: boolean
package/src/index.ts CHANGED
@@ -40,6 +40,7 @@ export type {
40
40
  WaveformXAxisLabelKind,
41
41
  WaveformXAxisLabelFormatterContext,
42
42
  WaveformXAxisLabelFormatter,
43
+ // Includes axes.y.maximumTickVisible and minimumTickVisible for independent extrema ticks.
43
44
  WaveformAxesOptions,
44
45
  WaveformYAxisLabelTextStyle,
45
46
  WaveformZeroLineOptions,
@@ -289,6 +289,10 @@ export interface WaveformAxesOptions {
289
289
  splitNumber?: number
290
290
  /** Expands Y-axis domains to equal, human-friendly intervals. Defaults to true. */
291
291
  nice?: boolean
292
+ /** Shows the full data maximum's extra tick and label. Defaults to true. */
293
+ maximumTickVisible?: boolean
294
+ /** Shows the full data minimum's extra tick and label. Defaults to true. */
295
+ minimumTickVisible?: boolean
292
296
  /** Fraction of the automatic Y span added above its maximum. Defaults to 0. */
293
297
  upperPaddingRatio?: number
294
298
  /** Fraction of the automatic Y span added below its minimum. Defaults to 0. */