@motionscript/charts 0.1.1-alpha.1 → 0.1.1-alpha.2

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 (81) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/README.md +19 -8
  3. package/dist/bar-chart/bar-chart.d.ts +97 -65
  4. package/dist/bar-chart/bar-chart.d.ts.map +1 -1
  5. package/dist/bar-chart/bar-chart.js +9 -5
  6. package/dist/bar-chart/bar-chart.js.map +1 -1
  7. package/dist/bar-chart/chart-bars.d.ts +29 -5
  8. package/dist/bar-chart/chart-bars.d.ts.map +1 -1
  9. package/dist/bar-chart/chart-bars.js +33 -8
  10. package/dist/bar-chart/chart-bars.js.map +1 -1
  11. package/dist/bar-chart/shared.d.ts +9 -4
  12. package/dist/bar-chart/shared.d.ts.map +1 -1
  13. package/dist/bar-chart/shared.js +10 -5
  14. package/dist/bar-chart/shared.js.map +1 -1
  15. package/dist/browser/chunks/chunk-7XCRX6GE.js +2 -0
  16. package/dist/browser/chunks/chunk-7XCRX6GE.js.map +7 -0
  17. package/dist/browser/index.js +1 -1
  18. package/dist/browser/index.js.map +3 -3
  19. package/dist/browser/kit.js +1 -1
  20. package/dist/browser/manifest.json +1 -1
  21. package/dist/kit/cartesian.d.ts +6 -4
  22. package/dist/kit/cartesian.d.ts.map +1 -1
  23. package/dist/kit/cartesian.js +5 -3
  24. package/dist/kit/cartesian.js.map +1 -1
  25. package/dist/kit/style.d.ts +339 -76
  26. package/dist/kit/style.d.ts.map +1 -1
  27. package/dist/kit/style.js +196 -101
  28. package/dist/kit/style.js.map +1 -1
  29. package/dist/line-chart/line-chart.d.ts +81 -57
  30. package/dist/line-chart/line-chart.d.ts.map +1 -1
  31. package/dist/line-chart/line-chart.js +9 -7
  32. package/dist/line-chart/line-chart.js.map +1 -1
  33. package/dist/pie-chart/pie-chart.d.ts +43 -43
  34. package/dist/pie-chart/pie-chart.d.ts.map +1 -1
  35. package/dist/pie-chart/pie-chart.js +2 -1
  36. package/dist/pie-chart/pie-chart.js.map +1 -1
  37. package/dist/pie-chart/shared.d.ts +15 -8
  38. package/dist/pie-chart/shared.d.ts.map +1 -1
  39. package/dist/pie-chart/shared.js +21 -20
  40. package/dist/pie-chart/shared.js.map +1 -1
  41. package/dist/radar-chart/index.d.ts +1 -1
  42. package/dist/radar-chart/index.d.ts.map +1 -1
  43. package/dist/radar-chart/index.js +1 -1
  44. package/dist/radar-chart/index.js.map +1 -1
  45. package/dist/radar-chart/radar-chart.d.ts +37 -43
  46. package/dist/radar-chart/radar-chart.d.ts.map +1 -1
  47. package/dist/radar-chart/radar-chart.js +12 -12
  48. package/dist/radar-chart/radar-chart.js.map +1 -1
  49. package/dist/radar-chart/radar-grid.d.ts +7 -1
  50. package/dist/radar-chart/radar-grid.d.ts.map +1 -1
  51. package/dist/radar-chart/radar-grid.js +17 -15
  52. package/dist/radar-chart/radar-grid.js.map +1 -1
  53. package/dist/radar-chart/shared.d.ts +7 -2
  54. package/dist/radar-chart/shared.d.ts.map +1 -1
  55. package/dist/radar-chart/shared.js +6 -0
  56. package/dist/radar-chart/shared.js.map +1 -1
  57. package/dist/radial-chart/radial-chart.d.ts +37 -43
  58. package/dist/radial-chart/radial-chart.d.ts.map +1 -1
  59. package/dist/radial-chart/radial-chart.js +2 -1
  60. package/dist/radial-chart/radial-chart.js.map +1 -1
  61. package/dist/radial-chart/shared.d.ts +13 -9
  62. package/dist/radial-chart/shared.d.ts.map +1 -1
  63. package/dist/radial-chart/shared.js +15 -16
  64. package/dist/radial-chart/shared.js.map +1 -1
  65. package/package.json +4 -4
  66. package/src/bar-chart/bar-chart.ts +17 -6
  67. package/src/bar-chart/chart-bars.ts +48 -9
  68. package/src/bar-chart/shared.ts +20 -5
  69. package/src/kit/cartesian.ts +10 -7
  70. package/src/kit/style.ts +214 -118
  71. package/src/line-chart/line-chart.ts +14 -8
  72. package/src/pie-chart/pie-chart.ts +3 -1
  73. package/src/pie-chart/shared.ts +30 -22
  74. package/src/radar-chart/index.ts +1 -1
  75. package/src/radar-chart/radar-chart.ts +16 -13
  76. package/src/radar-chart/radar-grid.ts +18 -13
  77. package/src/radar-chart/shared.ts +9 -2
  78. package/src/radial-chart/radial-chart.ts +3 -1
  79. package/src/radial-chart/shared.ts +30 -18
  80. package/dist/browser/chunks/chunk-R3Q5EE6E.js +0 -2
  81. package/dist/browser/chunks/chunk-R3Q5EE6E.js.map +0 -7
@@ -1,7 +1,10 @@
1
- import { type DataRecord, type NodeOf, type OutOf, type Node2D, type Node2DProps as _Node2DProps, type Fill as _Fill, type FillResolved as _FillResolved, type Stroke as _Stroke, type StrokeResolved as _StrokeResolved, type StyleInput as _StyleInput, type StyleValues as _StyleValues } from "@motionscript/sdk";
1
+ import { type DataRecord, type NodeOf, type OutOf, type Node2D, type Node2DProps as _Node2DProps, type TextStyle as _TextStyle, type Fill as _Fill, type FillResolved as _FillResolved, type Stroke as _Stroke, type StrokeResolved as _StrokeResolved, type StyleInput as _StyleInput, type StyleValues as _StyleValues } from "@motionscript/sdk";
2
2
  import { type AxisDomainConfig, type ResolvedAxisDomain } from "../kit/shared.js";
3
3
  import { type LineSeries, type LineStack, type PlotRegion } from "./shared.js";
4
4
  declare const LINE_STYLE: import("@motionscript/sdk").Type<_StyleInput<{
5
+ gridBackground: import("@motionscript/sdk").Type<_Fill, _FillResolved[], false>;
6
+ background: import("@motionscript/sdk").Type<_Fill, _FillResolved[], false>;
7
+ } & {
5
8
  legend: import("@motionscript/sdk").Type<"right" | "top" | "bottom" | "none", "right" | "top" | "bottom" | "none", false>;
6
9
  swatch: import("@motionscript/sdk").Type<"square" | "circle" | "line", "square" | "circle" | "line", false>;
7
10
  } & {
@@ -11,14 +14,14 @@ declare const LINE_STYLE: import("@motionscript/sdk").Type<_StyleInput<{
11
14
  showXAxis: import("@motionscript/sdk").Type<boolean, boolean, false>;
12
15
  showYAxis: import("@motionscript/sdk").Type<boolean, boolean, false>;
13
16
  } & {
14
- fontFamily: import("@motionscript/sdk").Type<string, string, false>;
15
- fontSize: import("@motionscript/sdk").Type<number, number, false>;
16
- fontWeight: import("@motionscript/sdk").Type<number, number, false>;
17
+ legendText: import("@motionscript/sdk").Type<_TextStyle, _TextStyle, false>;
18
+ xLabelText: import("@motionscript/sdk").Type<_TextStyle, _TextStyle, false>;
19
+ xTitleText: import("@motionscript/sdk").Type<_TextStyle, _TextStyle, false>;
20
+ yLabelText: import("@motionscript/sdk").Type<_TextStyle, _TextStyle, false>;
21
+ yTitleText: import("@motionscript/sdk").Type<_TextStyle, _TextStyle, false>;
22
+ valueText: import("@motionscript/sdk").Type<_TextStyle, _TextStyle, false>;
17
23
  } & {
18
- palette: import("@motionscript/sdk").Type<_Fill[], _FillResolved[][], false>;
19
- foreground: import("@motionscript/sdk").Type<_Fill, _FillResolved[], false>;
20
- muted: import("@motionscript/sdk").Type<_Fill, _FillResolved[], false>;
21
- background: import("@motionscript/sdk").Type<_Fill, _FillResolved[], false>;
24
+ seriesFills: import("@motionscript/sdk").Type<_Fill[], _FillResolved[][], false>;
22
25
  } & {
23
26
  strokeWidth: import("@motionscript/sdk").Type<number, number, false>;
24
27
  curve: import("@motionscript/sdk").Type<"step" | "linear" | "smooth", "step" | "linear" | "smooth", false>;
@@ -29,6 +32,9 @@ declare const LINE_STYLE: import("@motionscript/sdk").Type<_StyleInput<{
29
32
  } & {
30
33
  values: import("@motionscript/sdk").Type<"none" | "above" | "below", "none" | "above" | "below", false>;
31
34
  }>, _StyleValues<{
35
+ gridBackground: import("@motionscript/sdk").Type<_Fill, _FillResolved[], false>;
36
+ background: import("@motionscript/sdk").Type<_Fill, _FillResolved[], false>;
37
+ } & {
32
38
  legend: import("@motionscript/sdk").Type<"right" | "top" | "bottom" | "none", "right" | "top" | "bottom" | "none", false>;
33
39
  swatch: import("@motionscript/sdk").Type<"square" | "circle" | "line", "square" | "circle" | "line", false>;
34
40
  } & {
@@ -38,14 +44,14 @@ declare const LINE_STYLE: import("@motionscript/sdk").Type<_StyleInput<{
38
44
  showXAxis: import("@motionscript/sdk").Type<boolean, boolean, false>;
39
45
  showYAxis: import("@motionscript/sdk").Type<boolean, boolean, false>;
40
46
  } & {
41
- fontFamily: import("@motionscript/sdk").Type<string, string, false>;
42
- fontSize: import("@motionscript/sdk").Type<number, number, false>;
43
- fontWeight: import("@motionscript/sdk").Type<number, number, false>;
47
+ legendText: import("@motionscript/sdk").Type<_TextStyle, _TextStyle, false>;
48
+ xLabelText: import("@motionscript/sdk").Type<_TextStyle, _TextStyle, false>;
49
+ xTitleText: import("@motionscript/sdk").Type<_TextStyle, _TextStyle, false>;
50
+ yLabelText: import("@motionscript/sdk").Type<_TextStyle, _TextStyle, false>;
51
+ yTitleText: import("@motionscript/sdk").Type<_TextStyle, _TextStyle, false>;
52
+ valueText: import("@motionscript/sdk").Type<_TextStyle, _TextStyle, false>;
44
53
  } & {
45
- palette: import("@motionscript/sdk").Type<_Fill[], _FillResolved[][], false>;
46
- foreground: import("@motionscript/sdk").Type<_Fill, _FillResolved[], false>;
47
- muted: import("@motionscript/sdk").Type<_Fill, _FillResolved[], false>;
48
- background: import("@motionscript/sdk").Type<_Fill, _FillResolved[], false>;
54
+ seriesFills: import("@motionscript/sdk").Type<_Fill[], _FillResolved[][], false>;
49
55
  } & {
50
56
  strokeWidth: import("@motionscript/sdk").Type<number, number, false>;
51
57
  curve: import("@motionscript/sdk").Type<"step" | "linear" | "smooth", "step" | "linear" | "smooth", false>;
@@ -99,6 +105,9 @@ export declare const LineChart: import("@motionscript/sdk").Component<"lineChart
99
105
  readonly xAxis: import("@motionscript/sdk").Type<AxisDomainConfig, AxisDomainConfig, false>;
100
106
  readonly yAxis: import("@motionscript/sdk").Type<AxisDomainConfig, AxisDomainConfig, false>;
101
107
  readonly style: import("@motionscript/sdk").Type<_StyleInput<{
108
+ gridBackground: import("@motionscript/sdk").Type<_Fill, _FillResolved[], false>;
109
+ background: import("@motionscript/sdk").Type<_Fill, _FillResolved[], false>;
110
+ } & {
102
111
  legend: import("@motionscript/sdk").Type<"right" | "top" | "bottom" | "none", "right" | "top" | "bottom" | "none", false>;
103
112
  swatch: import("@motionscript/sdk").Type<"square" | "circle" | "line", "square" | "circle" | "line", false>;
104
113
  } & {
@@ -108,14 +117,14 @@ export declare const LineChart: import("@motionscript/sdk").Component<"lineChart
108
117
  showXAxis: import("@motionscript/sdk").Type<boolean, boolean, false>;
109
118
  showYAxis: import("@motionscript/sdk").Type<boolean, boolean, false>;
110
119
  } & {
111
- fontFamily: import("@motionscript/sdk").Type<string, string, false>;
112
- fontSize: import("@motionscript/sdk").Type<number, number, false>;
113
- fontWeight: import("@motionscript/sdk").Type<number, number, false>;
120
+ legendText: import("@motionscript/sdk").Type<_TextStyle, _TextStyle, false>;
121
+ xLabelText: import("@motionscript/sdk").Type<_TextStyle, _TextStyle, false>;
122
+ xTitleText: import("@motionscript/sdk").Type<_TextStyle, _TextStyle, false>;
123
+ yLabelText: import("@motionscript/sdk").Type<_TextStyle, _TextStyle, false>;
124
+ yTitleText: import("@motionscript/sdk").Type<_TextStyle, _TextStyle, false>;
125
+ valueText: import("@motionscript/sdk").Type<_TextStyle, _TextStyle, false>;
114
126
  } & {
115
- palette: import("@motionscript/sdk").Type<_Fill[], _FillResolved[][], false>;
116
- foreground: import("@motionscript/sdk").Type<_Fill, _FillResolved[], false>;
117
- muted: import("@motionscript/sdk").Type<_Fill, _FillResolved[], false>;
118
- background: import("@motionscript/sdk").Type<_Fill, _FillResolved[], false>;
127
+ seriesFills: import("@motionscript/sdk").Type<_Fill[], _FillResolved[][], false>;
119
128
  } & {
120
129
  strokeWidth: import("@motionscript/sdk").Type<number, number, false>;
121
130
  curve: import("@motionscript/sdk").Type<"step" | "linear" | "smooth", "step" | "linear" | "smooth", false>;
@@ -126,6 +135,9 @@ export declare const LineChart: import("@motionscript/sdk").Component<"lineChart
126
135
  } & {
127
136
  values: import("@motionscript/sdk").Type<"none" | "above" | "below", "none" | "above" | "below", false>;
128
137
  }>, _StyleValues<{
138
+ gridBackground: import("@motionscript/sdk").Type<_Fill, _FillResolved[], false>;
139
+ background: import("@motionscript/sdk").Type<_Fill, _FillResolved[], false>;
140
+ } & {
129
141
  legend: import("@motionscript/sdk").Type<"right" | "top" | "bottom" | "none", "right" | "top" | "bottom" | "none", false>;
130
142
  swatch: import("@motionscript/sdk").Type<"square" | "circle" | "line", "square" | "circle" | "line", false>;
131
143
  } & {
@@ -135,14 +147,14 @@ export declare const LineChart: import("@motionscript/sdk").Component<"lineChart
135
147
  showXAxis: import("@motionscript/sdk").Type<boolean, boolean, false>;
136
148
  showYAxis: import("@motionscript/sdk").Type<boolean, boolean, false>;
137
149
  } & {
138
- fontFamily: import("@motionscript/sdk").Type<string, string, false>;
139
- fontSize: import("@motionscript/sdk").Type<number, number, false>;
140
- fontWeight: import("@motionscript/sdk").Type<number, number, false>;
150
+ legendText: import("@motionscript/sdk").Type<_TextStyle, _TextStyle, false>;
151
+ xLabelText: import("@motionscript/sdk").Type<_TextStyle, _TextStyle, false>;
152
+ xTitleText: import("@motionscript/sdk").Type<_TextStyle, _TextStyle, false>;
153
+ yLabelText: import("@motionscript/sdk").Type<_TextStyle, _TextStyle, false>;
154
+ yTitleText: import("@motionscript/sdk").Type<_TextStyle, _TextStyle, false>;
155
+ valueText: import("@motionscript/sdk").Type<_TextStyle, _TextStyle, false>;
141
156
  } & {
142
- palette: import("@motionscript/sdk").Type<_Fill[], _FillResolved[][], false>;
143
- foreground: import("@motionscript/sdk").Type<_Fill, _FillResolved[], false>;
144
- muted: import("@motionscript/sdk").Type<_Fill, _FillResolved[], false>;
145
- background: import("@motionscript/sdk").Type<_Fill, _FillResolved[], false>;
157
+ seriesFills: import("@motionscript/sdk").Type<_Fill[], _FillResolved[][], false>;
146
158
  } & {
147
159
  strokeWidth: import("@motionscript/sdk").Type<number, number, false>;
148
160
  curve: import("@motionscript/sdk").Type<"step" | "linear" | "smooth", "step" | "linear" | "smooth", false>;
@@ -191,6 +203,9 @@ export declare const LineChart: import("@motionscript/sdk").Component<"lineChart
191
203
  readonly xAxis: import("@motionscript/sdk").Type<AxisDomainConfig, AxisDomainConfig, false>;
192
204
  readonly yAxis: import("@motionscript/sdk").Type<AxisDomainConfig, AxisDomainConfig, false>;
193
205
  readonly style: import("@motionscript/sdk").Type<_StyleInput<{
206
+ gridBackground: import("@motionscript/sdk").Type<_Fill, _FillResolved[], false>;
207
+ background: import("@motionscript/sdk").Type<_Fill, _FillResolved[], false>;
208
+ } & {
194
209
  legend: import("@motionscript/sdk").Type<"right" | "top" | "bottom" | "none", "right" | "top" | "bottom" | "none", false>;
195
210
  swatch: import("@motionscript/sdk").Type<"square" | "circle" | "line", "square" | "circle" | "line", false>;
196
211
  } & {
@@ -200,14 +215,14 @@ export declare const LineChart: import("@motionscript/sdk").Component<"lineChart
200
215
  showXAxis: import("@motionscript/sdk").Type<boolean, boolean, false>;
201
216
  showYAxis: import("@motionscript/sdk").Type<boolean, boolean, false>;
202
217
  } & {
203
- fontFamily: import("@motionscript/sdk").Type<string, string, false>;
204
- fontSize: import("@motionscript/sdk").Type<number, number, false>;
205
- fontWeight: import("@motionscript/sdk").Type<number, number, false>;
218
+ legendText: import("@motionscript/sdk").Type<_TextStyle, _TextStyle, false>;
219
+ xLabelText: import("@motionscript/sdk").Type<_TextStyle, _TextStyle, false>;
220
+ xTitleText: import("@motionscript/sdk").Type<_TextStyle, _TextStyle, false>;
221
+ yLabelText: import("@motionscript/sdk").Type<_TextStyle, _TextStyle, false>;
222
+ yTitleText: import("@motionscript/sdk").Type<_TextStyle, _TextStyle, false>;
223
+ valueText: import("@motionscript/sdk").Type<_TextStyle, _TextStyle, false>;
206
224
  } & {
207
- palette: import("@motionscript/sdk").Type<_Fill[], _FillResolved[][], false>;
208
- foreground: import("@motionscript/sdk").Type<_Fill, _FillResolved[], false>;
209
- muted: import("@motionscript/sdk").Type<_Fill, _FillResolved[], false>;
210
- background: import("@motionscript/sdk").Type<_Fill, _FillResolved[], false>;
225
+ seriesFills: import("@motionscript/sdk").Type<_Fill[], _FillResolved[][], false>;
211
226
  } & {
212
227
  strokeWidth: import("@motionscript/sdk").Type<number, number, false>;
213
228
  curve: import("@motionscript/sdk").Type<"step" | "linear" | "smooth", "step" | "linear" | "smooth", false>;
@@ -218,6 +233,9 @@ export declare const LineChart: import("@motionscript/sdk").Component<"lineChart
218
233
  } & {
219
234
  values: import("@motionscript/sdk").Type<"none" | "above" | "below", "none" | "above" | "below", false>;
220
235
  }>, _StyleValues<{
236
+ gridBackground: import("@motionscript/sdk").Type<_Fill, _FillResolved[], false>;
237
+ background: import("@motionscript/sdk").Type<_Fill, _FillResolved[], false>;
238
+ } & {
221
239
  legend: import("@motionscript/sdk").Type<"right" | "top" | "bottom" | "none", "right" | "top" | "bottom" | "none", false>;
222
240
  swatch: import("@motionscript/sdk").Type<"square" | "circle" | "line", "square" | "circle" | "line", false>;
223
241
  } & {
@@ -227,14 +245,14 @@ export declare const LineChart: import("@motionscript/sdk").Component<"lineChart
227
245
  showXAxis: import("@motionscript/sdk").Type<boolean, boolean, false>;
228
246
  showYAxis: import("@motionscript/sdk").Type<boolean, boolean, false>;
229
247
  } & {
230
- fontFamily: import("@motionscript/sdk").Type<string, string, false>;
231
- fontSize: import("@motionscript/sdk").Type<number, number, false>;
232
- fontWeight: import("@motionscript/sdk").Type<number, number, false>;
248
+ legendText: import("@motionscript/sdk").Type<_TextStyle, _TextStyle, false>;
249
+ xLabelText: import("@motionscript/sdk").Type<_TextStyle, _TextStyle, false>;
250
+ xTitleText: import("@motionscript/sdk").Type<_TextStyle, _TextStyle, false>;
251
+ yLabelText: import("@motionscript/sdk").Type<_TextStyle, _TextStyle, false>;
252
+ yTitleText: import("@motionscript/sdk").Type<_TextStyle, _TextStyle, false>;
253
+ valueText: import("@motionscript/sdk").Type<_TextStyle, _TextStyle, false>;
233
254
  } & {
234
- palette: import("@motionscript/sdk").Type<_Fill[], _FillResolved[][], false>;
235
- foreground: import("@motionscript/sdk").Type<_Fill, _FillResolved[], false>;
236
- muted: import("@motionscript/sdk").Type<_Fill, _FillResolved[], false>;
237
- background: import("@motionscript/sdk").Type<_Fill, _FillResolved[], false>;
255
+ seriesFills: import("@motionscript/sdk").Type<_Fill[], _FillResolved[][], false>;
238
256
  } & {
239
257
  strokeWidth: import("@motionscript/sdk").Type<number, number, false>;
240
258
  curve: import("@motionscript/sdk").Type<"step" | "linear" | "smooth", "step" | "linear" | "smooth", false>;
@@ -264,6 +282,9 @@ export declare const LineChart: import("@motionscript/sdk").Component<"lineChart
264
282
  readonly xAxis: import("@motionscript/sdk").Type<AxisDomainConfig, AxisDomainConfig, false>;
265
283
  readonly yAxis: import("@motionscript/sdk").Type<AxisDomainConfig, AxisDomainConfig, false>;
266
284
  readonly style: import("@motionscript/sdk").Type<_StyleInput<{
285
+ gridBackground: import("@motionscript/sdk").Type<_Fill, _FillResolved[], false>;
286
+ background: import("@motionscript/sdk").Type<_Fill, _FillResolved[], false>;
287
+ } & {
267
288
  legend: import("@motionscript/sdk").Type<"right" | "top" | "bottom" | "none", "right" | "top" | "bottom" | "none", false>;
268
289
  swatch: import("@motionscript/sdk").Type<"square" | "circle" | "line", "square" | "circle" | "line", false>;
269
290
  } & {
@@ -273,14 +294,14 @@ export declare const LineChart: import("@motionscript/sdk").Component<"lineChart
273
294
  showXAxis: import("@motionscript/sdk").Type<boolean, boolean, false>;
274
295
  showYAxis: import("@motionscript/sdk").Type<boolean, boolean, false>;
275
296
  } & {
276
- fontFamily: import("@motionscript/sdk").Type<string, string, false>;
277
- fontSize: import("@motionscript/sdk").Type<number, number, false>;
278
- fontWeight: import("@motionscript/sdk").Type<number, number, false>;
297
+ legendText: import("@motionscript/sdk").Type<_TextStyle, _TextStyle, false>;
298
+ xLabelText: import("@motionscript/sdk").Type<_TextStyle, _TextStyle, false>;
299
+ xTitleText: import("@motionscript/sdk").Type<_TextStyle, _TextStyle, false>;
300
+ yLabelText: import("@motionscript/sdk").Type<_TextStyle, _TextStyle, false>;
301
+ yTitleText: import("@motionscript/sdk").Type<_TextStyle, _TextStyle, false>;
302
+ valueText: import("@motionscript/sdk").Type<_TextStyle, _TextStyle, false>;
279
303
  } & {
280
- palette: import("@motionscript/sdk").Type<_Fill[], _FillResolved[][], false>;
281
- foreground: import("@motionscript/sdk").Type<_Fill, _FillResolved[], false>;
282
- muted: import("@motionscript/sdk").Type<_Fill, _FillResolved[], false>;
283
- background: import("@motionscript/sdk").Type<_Fill, _FillResolved[], false>;
304
+ seriesFills: import("@motionscript/sdk").Type<_Fill[], _FillResolved[][], false>;
284
305
  } & {
285
306
  strokeWidth: import("@motionscript/sdk").Type<number, number, false>;
286
307
  curve: import("@motionscript/sdk").Type<"step" | "linear" | "smooth", "step" | "linear" | "smooth", false>;
@@ -291,6 +312,9 @@ export declare const LineChart: import("@motionscript/sdk").Component<"lineChart
291
312
  } & {
292
313
  values: import("@motionscript/sdk").Type<"none" | "above" | "below", "none" | "above" | "below", false>;
293
314
  }>, _StyleValues<{
315
+ gridBackground: import("@motionscript/sdk").Type<_Fill, _FillResolved[], false>;
316
+ background: import("@motionscript/sdk").Type<_Fill, _FillResolved[], false>;
317
+ } & {
294
318
  legend: import("@motionscript/sdk").Type<"right" | "top" | "bottom" | "none", "right" | "top" | "bottom" | "none", false>;
295
319
  swatch: import("@motionscript/sdk").Type<"square" | "circle" | "line", "square" | "circle" | "line", false>;
296
320
  } & {
@@ -300,14 +324,14 @@ export declare const LineChart: import("@motionscript/sdk").Component<"lineChart
300
324
  showXAxis: import("@motionscript/sdk").Type<boolean, boolean, false>;
301
325
  showYAxis: import("@motionscript/sdk").Type<boolean, boolean, false>;
302
326
  } & {
303
- fontFamily: import("@motionscript/sdk").Type<string, string, false>;
304
- fontSize: import("@motionscript/sdk").Type<number, number, false>;
305
- fontWeight: import("@motionscript/sdk").Type<number, number, false>;
327
+ legendText: import("@motionscript/sdk").Type<_TextStyle, _TextStyle, false>;
328
+ xLabelText: import("@motionscript/sdk").Type<_TextStyle, _TextStyle, false>;
329
+ xTitleText: import("@motionscript/sdk").Type<_TextStyle, _TextStyle, false>;
330
+ yLabelText: import("@motionscript/sdk").Type<_TextStyle, _TextStyle, false>;
331
+ yTitleText: import("@motionscript/sdk").Type<_TextStyle, _TextStyle, false>;
332
+ valueText: import("@motionscript/sdk").Type<_TextStyle, _TextStyle, false>;
306
333
  } & {
307
- palette: import("@motionscript/sdk").Type<_Fill[], _FillResolved[][], false>;
308
- foreground: import("@motionscript/sdk").Type<_Fill, _FillResolved[], false>;
309
- muted: import("@motionscript/sdk").Type<_Fill, _FillResolved[], false>;
310
- background: import("@motionscript/sdk").Type<_Fill, _FillResolved[], false>;
334
+ seriesFills: import("@motionscript/sdk").Type<_Fill[], _FillResolved[][], false>;
311
335
  } & {
312
336
  strokeWidth: import("@motionscript/sdk").Type<number, number, false>;
313
337
  curve: import("@motionscript/sdk").Type<"step" | "linear" | "smooth", "step" | "linear" | "smooth", false>;
@@ -1 +1 @@
1
- {"version":3,"file":"line-chart.d.ts","sourceRoot":"","sources":["../../src/line-chart/line-chart.ts"],"names":[],"mappings":"AAAA,OAAO,EAQL,KAAK,UAAU,EACf,KAAK,MAAM,EACX,KAAK,KAAK,EAEV,KAAK,MAAM,EACX,KAAK,WAAW,IAAI,YAAY,EAChC,KAAK,IAAI,IAAI,KAAK,EAClB,KAAK,YAAY,IAAI,aAAa,EAClC,KAAK,MAAM,IAAI,OAAO,EACtB,KAAK,cAAc,IAAI,eAAe,EAEtC,KAAK,UAAU,IAAI,WAAW,EAC9B,KAAK,WAAW,IAAI,YAAY,EAEjC,MAAM,mBAAmB,CAAA;AAS1B,OAAO,EAWL,KAAK,gBAAgB,EAErB,KAAK,kBAAkB,EACxB,MAAM,eAAe,CAAA;AAgBtB,OAAO,EAML,KAAK,UAAU,EACf,KAAK,SAAS,EACd,KAAK,UAAU,EAGhB,MAAM,UAAU,CAAA;AAGjB,QAAA,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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CAAA;AAEF,MAAM,MAAM,SAAS,GAAG,MAAM,CAAC,OAAO,SAAS,CAAC,CAAA"}
@@ -7,13 +7,13 @@ import { SERIES_ARG, asParts, fresh } from "../kit/entries.js";
7
7
  import { HorizontalAxis } from "../kit/horizontal-axis.js";
8
8
  import { DEFAULT_MARKERS, ENTER_SHARE, beats, legendAway } from "../kit/motion.js";
9
9
  import { SPOTLIGHT_DIM, formatMarker, lerpAxisDomain, lerpAxisEntry, markerStep, markerValues, niceRange, niceTicks, resolveAxisDomain, settleAxisDomain, } from "../kit/shared.js";
10
- import { CARTESIAN_GRID, CHART_COLORS, CHART_LEGEND, CHART_STYLE_FAMILY, CHART_STYLE_PRESETS, CHART_TEXT, axisConfigOf, legendConfigOf, seriesFill, valueText, } from "../kit/style.js";
10
+ import { CARTESIAN_GRID, CARTESIAN_TEXT, CHART_LEGEND, CHART_SERIES, CHART_STYLE_FAMILY, CHART_STYLE_PRESETS, GRID_BACKGROUND, axisConfigOf, legendConfigOf, migrateChartStyle, seriesFill, sizeOf, valueText, } from "../kit/style.js";
11
11
  import { VerticalAxis, axisPads } from "../kit/vertical-axis.js";
12
12
  import { ChartArea, ChartLine, traceX } from "./chart-line.js";
13
13
  import { ChartRegion } from "./chart-region.js";
14
14
  import { LINE_LABELS, LINE_MARKS, resolveRegionBox, stackExtent, stackSeries, } from "./shared.js";
15
15
  import { resolveXScale } from "./x-scale.js";
16
- const LINE_STYLE = Types.style(CHART_STYLE_FAMILY, { colors: CHART_COLORS, text: CHART_TEXT, grid: CARTESIAN_GRID, marks: LINE_MARKS, labels: LINE_LABELS, legend: CHART_LEGEND }, { presets: CHART_STYLE_PRESETS });
16
+ const LINE_STYLE = Types.style(CHART_STYLE_FAMILY, { series: CHART_SERIES, background: GRID_BACKGROUND, text: CARTESIAN_TEXT, grid: CARTESIAN_GRID, marks: LINE_MARKS, labels: LINE_LABELS, legend: CHART_LEGEND }, { presets: CHART_STYLE_PRESETS });
17
17
  /** One argument, two controls: the commands take a `PlotRegion`, so the x and y spans a host draws are declared inside it. */
18
18
  const REGION_ARG = Types.custom(undefined, {
19
19
  kind: "region",
@@ -228,6 +228,7 @@ export const LineChart = component2d({
228
228
  height: "fill",
229
229
  weights: (state) => state.series.map((s) => ((s.enabled ?? true) ? 1 : 0)),
230
230
  },
231
+ migrate: { style: migrateChartStyle("cartesian") },
231
232
  allowedChildren: [],
232
233
  children: (state) => {
233
234
  const style = () => state.style;
@@ -317,7 +318,7 @@ export const LineChart = component2d({
317
318
  state.data.forEach((_row, k) => {
318
319
  const line = lines[i];
319
320
  const label = new Text({
320
- ...boundText(() => ({ ...valueText(style()), fontSize: Math.round(style().fontSize * 0.8) })),
321
+ ...boundText(() => valueText(style())),
321
322
  text: () => {
322
323
  const value = pixels(i).values[k];
323
324
  return value === undefined ? "" : yLabel(state, value, domains().y.ticks);
@@ -329,7 +330,7 @@ export const LineChart = component2d({
329
330
  },
330
331
  y: () => {
331
332
  const point = pixels(i).points[k];
332
- const clear = label.layoutBounds.height / 2 + (style().dots ? style().dotSize / 2 : style().strokeWidth / 2) + Math.round(style().fontSize * 0.25);
333
+ const clear = label.layoutBounds.height / 2 + (style().dots ? style().dotSize / 2 : style().strokeWidth / 2) + Math.round(sizeOf(style().valueText) * 0.25);
333
334
  return (point?.y ?? 0) + (below ? -clear : clear);
334
335
  },
335
336
  // In once the trace has passed its point.
@@ -358,7 +359,7 @@ export const LineChart = component2d({
358
359
  clip: () => state.clipped || overflows(state, domains()),
359
360
  children: [
360
361
  new ChartCanvas({
361
- fill: () => style().background,
362
+ fill: () => style().gridBackground,
362
363
  xGridStroke: () => style().verticalGrid,
363
364
  yGridStroke: () => style().horizontalGrid,
364
365
  xMarkers: () => domains().x.ticks,
@@ -372,8 +373,8 @@ export const LineChart = component2d({
372
373
  // Under the marks, so the highlight does not tint the stretch it picks out.
373
374
  new ChartRegion({
374
375
  box: spotlight,
375
- stroke: () => ({ weight: 2, fill: fade(style().foreground, 0.7), dash: [14, 12], cap: "butt", align: "center" }),
376
- fill: () => fade(style().foreground, 0.06),
376
+ stroke: () => ({ weight: 2, fill: fade(style().valueText.fill ?? "white", 0.7), dash: [14, 12], cap: "butt", align: "center" }),
377
+ fill: () => fade(style().valueText.fill ?? "white", 0.06),
377
378
  reveal: () => state.regionReveal,
378
379
  }),
379
380
  ...areas,
@@ -383,6 +384,7 @@ export const LineChart = component2d({
383
384
  });
384
385
  return asParts([
385
386
  cartesianFrame({
387
+ background: () => style().background,
386
388
  left: vAxis,
387
389
  ghost,
388
390
  plot,