poetry-charts 0.0.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 (124) hide show
  1. checksums.yaml +7 -0
  2. data/.gitattributes +6 -0
  3. data/CHANGELOG.md +3 -0
  4. data/LICENSE.txt +21 -0
  5. data/README.md +94 -0
  6. data/THIRD_PARTY_NOTICES.md +39 -0
  7. data/app/assets/stylesheets/poetry-charts.css +117 -0
  8. data/app/components/poetry/charts/adapter_chart/component.html.erb +6 -0
  9. data/app/components/poetry/charts/adapter_chart/component.rb +99 -0
  10. data/app/components/poetry/charts/adapter_chart/preview.rb +37 -0
  11. data/app/components/poetry/charts/adapter_chart/style.rb +16 -0
  12. data/app/components/poetry/charts/area_chart/component.html.erb +75 -0
  13. data/app/components/poetry/charts/area_chart/component.rb +251 -0
  14. data/app/components/poetry/charts/area_chart/preview.rb +95 -0
  15. data/app/components/poetry/charts/area_chart/style.rb +29 -0
  16. data/app/components/poetry/charts/bar_chart/component.html.erb +95 -0
  17. data/app/components/poetry/charts/bar_chart/component.rb +318 -0
  18. data/app/components/poetry/charts/bar_chart/preview.rb +115 -0
  19. data/app/components/poetry/charts/bar_chart/style.rb +28 -0
  20. data/app/components/poetry/charts/bar_math.rb +95 -0
  21. data/app/components/poetry/charts/cartesian_family.rb +105 -0
  22. data/app/components/poetry/charts/chart_family.rb +58 -0
  23. data/app/components/poetry/charts/composed_chart/component.html.erb +95 -0
  24. data/app/components/poetry/charts/composed_chart/component.rb +309 -0
  25. data/app/components/poetry/charts/composed_chart/preview.rb +62 -0
  26. data/app/components/poetry/charts/composed_chart/style.rb +24 -0
  27. data/app/components/poetry/charts/container/component.html.erb +4 -0
  28. data/app/components/poetry/charts/container/component.rb +80 -0
  29. data/app/components/poetry/charts/container/preview.rb +45 -0
  30. data/app/components/poetry/charts/container/style.rb +22 -0
  31. data/app/components/poetry/charts/error_bars.rb +35 -0
  32. data/app/components/poetry/charts/legend_content/component.html.erb +10 -0
  33. data/app/components/poetry/charts/legend_content/component.rb +122 -0
  34. data/app/components/poetry/charts/legend_content/preview.rb +23 -0
  35. data/app/components/poetry/charts/legend_content/style.rb +26 -0
  36. data/app/components/poetry/charts/line_chart/component.html.erb +85 -0
  37. data/app/components/poetry/charts/line_chart/component.rb +252 -0
  38. data/app/components/poetry/charts/line_chart/preview.rb +115 -0
  39. data/app/components/poetry/charts/line_chart/style.rb +28 -0
  40. data/app/components/poetry/charts/live.rb +296 -0
  41. data/app/components/poetry/charts/motion.rb +98 -0
  42. data/app/components/poetry/charts/pie_chart/component.html.erb +36 -0
  43. data/app/components/poetry/charts/pie_chart/component.rb +256 -0
  44. data/app/components/poetry/charts/pie_chart/preview.rb +100 -0
  45. data/app/components/poetry/charts/pie_chart/style.rb +19 -0
  46. data/app/components/poetry/charts/polar_family.rb +95 -0
  47. data/app/components/poetry/charts/radar_chart/component.html.erb +73 -0
  48. data/app/components/poetry/charts/radar_chart/component.rb +329 -0
  49. data/app/components/poetry/charts/radar_chart/preview.rb +97 -0
  50. data/app/components/poetry/charts/radar_chart/style.rb +21 -0
  51. data/app/components/poetry/charts/radial_bar_chart/component.html.erb +65 -0
  52. data/app/components/poetry/charts/radial_bar_chart/component.rb +424 -0
  53. data/app/components/poetry/charts/radial_bar_chart/preview.rb +99 -0
  54. data/app/components/poetry/charts/radial_bar_chart/style.rb +27 -0
  55. data/app/components/poetry/charts/reference_marks.rb +156 -0
  56. data/app/components/poetry/charts/scatter_chart/component.html.erb +55 -0
  57. data/app/components/poetry/charts/scatter_chart/component.rb +396 -0
  58. data/app/components/poetry/charts/scatter_chart/preview.rb +93 -0
  59. data/app/components/poetry/charts/scatter_chart/style.rb +22 -0
  60. data/app/components/poetry/charts/tooltip_content/component.html.erb +19 -0
  61. data/app/components/poetry/charts/tooltip_content/component.rb +168 -0
  62. data/app/components/poetry/charts/tooltip_content/preview.rb +39 -0
  63. data/app/components/poetry/charts/tooltip_content/style.rb +31 -0
  64. data/app/components/poetry/charts/tooltip_layer/component.html.erb +6 -0
  65. data/app/components/poetry/charts/tooltip_layer/component.rb +61 -0
  66. data/app/components/poetry/charts/tooltip_layer/style.rb +13 -0
  67. data/app/components/poetry/charts/tooltip_wiring.rb +167 -0
  68. data/app/helpers/poetry/charts/components_helper.rb +125 -0
  69. data/app/javascript/poetry/charts/adapter_controller.js +75 -0
  70. data/app/javascript/poetry/charts/adapter_registry.js +52 -0
  71. data/app/javascript/poetry/charts/adapters/chartjs.js +86 -0
  72. data/app/javascript/poetry/charts/d3.js +14 -0
  73. data/app/javascript/poetry/charts/index.js +67 -0
  74. data/app/javascript/poetry/charts/live/renderer.js +456 -0
  75. data/app/javascript/poetry/charts/live_controller.js +195 -0
  76. data/app/javascript/poetry/charts/motion/flip.js +169 -0
  77. data/app/javascript/poetry/charts/motion/sector.js +62 -0
  78. data/app/javascript/poetry/charts/motion/tween.js +105 -0
  79. data/app/javascript/poetry/charts/motion_controller.js +230 -0
  80. data/app/javascript/poetry/charts/tooltip_controller.js +331 -0
  81. data/app/javascript/poetry/charts/window_controller.js +195 -0
  82. data/config/component_descriptions.yml +14 -0
  83. data/config/component_registry.yml +3055 -0
  84. data/config/controllers_manifest.json +100 -0
  85. data/config/importmap.rb +10 -0
  86. data/lib/poetry/charts/cartesian.rb +277 -0
  87. data/lib/poetry/charts/config.rb +149 -0
  88. data/lib/poetry/charts/engine.rb +76 -0
  89. data/lib/poetry/charts/geometry/area.rb +68 -0
  90. data/lib/poetry/charts/geometry/curve.rb +327 -0
  91. data/lib/poetry/charts/geometry/line.rb +64 -0
  92. data/lib/poetry/charts/geometry/nice_ticks.rb +220 -0
  93. data/lib/poetry/charts/geometry/path.rb +96 -0
  94. data/lib/poetry/charts/geometry/scale/band.rb +81 -0
  95. data/lib/poetry/charts/geometry/scale/linear.rb +127 -0
  96. data/lib/poetry/charts/geometry/stack.rb +129 -0
  97. data/lib/poetry/charts/geometry/ticks.rb +103 -0
  98. data/lib/poetry/charts/geometry.rb +66 -0
  99. data/lib/poetry/charts/polar.rb +179 -0
  100. data/lib/poetry/charts/spec.rb +108 -0
  101. data/lib/poetry/charts/theme_style.rb +53 -0
  102. data/lib/poetry/charts/version.rb +8 -0
  103. data/lib/poetry/charts.rb +114 -0
  104. data/lib/poetry-charts.rb +4 -0
  105. data/themes/default.css +146 -0
  106. data/themes/luma.css +139 -0
  107. data/themes/lyra.css +140 -0
  108. data/themes/maia.css +139 -0
  109. data/themes/mira.css +139 -0
  110. data/themes/nova.css +139 -0
  111. data/themes/rhea.css +139 -0
  112. data/themes/sera.css +140 -0
  113. data/themes/vega.css +144 -0
  114. data/vendor/d3-kernel/LICENSE-d3.txt +17 -0
  115. data/vendor/d3-kernel/LICENSE-decimal.js-light.txt +25 -0
  116. data/vendor/d3-kernel/LICENSE-recharts.txt +26 -0
  117. data/vendor/d3-kernel/README.md +30 -0
  118. data/vendor/d3-kernel/build.mjs +66 -0
  119. data/vendor/d3-kernel/entry.js +27 -0
  120. data/vendor/d3-kernel/recharts/state/cartesianAxisSlice.ts +6 -0
  121. data/vendor/d3-kernel/recharts/util/scale/getNiceTickValues.ts +310 -0
  122. data/vendor/d3-kernel/recharts/util/scale/util/arithmetic.ts +54 -0
  123. data/vendor/d3-kernel/recharts/util/types.ts +5 -0
  124. metadata +186 -0
@@ -0,0 +1,310 @@
1
+ /**
2
+ * @fileOverview calculate tick values of scale
3
+ * @author xile611, arcthur
4
+ * @date 2015-09-17
5
+ */
6
+ import Decimal from 'decimal.js-light';
7
+ import { getDigitCount, rangeStep } from './util/arithmetic';
8
+ import { NumberDomain } from '../types';
9
+ import { NiceTicksAlgorithm } from '../../state/cartesianAxisSlice';
10
+
11
+ /**
12
+ * Calculate a interval of a minimum value and a maximum value
13
+ *
14
+ * @param {Number} min The minimum value
15
+ * @param {Number} max The maximum value
16
+ * @return {Array} An interval
17
+ */
18
+ export const getValidInterval = ([min, max]: [number, number]): [number, number] => {
19
+ let [validMin, validMax] = [min, max];
20
+
21
+ // exchange
22
+ if (min > max) {
23
+ [validMin, validMax] = [max, min];
24
+ }
25
+
26
+ return [validMin, validMax];
27
+ };
28
+
29
+ /**
30
+ * Calculate the step which is easy to understand between ticks, like 10, 20, 25
31
+ *
32
+ * @param roughStep The rough step calculated by dividing the difference by the tickCount
33
+ * @param allowDecimals Allow the ticks to be decimals or not
34
+ * @param correctionFactor A correction factor
35
+ * @return The step which is easy to understand between two ticks
36
+ */
37
+ export const getAdaptiveStep = (roughStep: Decimal, allowDecimals: boolean, correctionFactor: number) => {
38
+ if (roughStep.lte(0)) {
39
+ return new Decimal(0);
40
+ }
41
+
42
+ const digitCount = getDigitCount(roughStep.toNumber());
43
+ // The ratio between the rough step and the smallest number which has a bigger
44
+ // order of magnitudes than the rough step
45
+ const digitCountValue = new Decimal(10).pow(digitCount);
46
+ const stepRatio = roughStep.div(digitCountValue);
47
+ // When an integer and a float multiplied, the accuracy of result may be wrong
48
+ const stepRatioScale = digitCount !== 1 ? 0.05 : 0.1;
49
+ const amendStepRatio = new Decimal(Math.ceil(stepRatio.div(stepRatioScale).toNumber()))
50
+ .add(correctionFactor)
51
+ .mul(stepRatioScale);
52
+
53
+ const formatStep = amendStepRatio.mul(digitCountValue);
54
+
55
+ return allowDecimals ? new Decimal(formatStep.toNumber()) : new Decimal(Math.ceil(formatStep.toNumber()));
56
+ };
57
+
58
+ type StepFunction = (roughStep: Decimal, allowDecimals: boolean, correctionFactor: number) => Decimal;
59
+
60
+ /**
61
+ * The snap125 step algorithm snaps to nice numbers (1, 2, 2.5, 5) at each
62
+ * order of magnitude, producing human-friendly tick intervals like
63
+ * 0, 5, 10, 15, 20 instead of 0, 4, 8, 12, 16.
64
+ *
65
+ * This is opt-in and can be enabled via the `niceTicks` prop on axis components.
66
+ *
67
+ * @param roughStep The rough step calculated by dividing the difference by the tickCount
68
+ * @param allowDecimals Allow the ticks to be decimals or not
69
+ * @param correctionFactor A correction factor
70
+ * @return The step which is easy to understand between two ticks
71
+ */
72
+ export const getSnap125Step: StepFunction = (roughStep: Decimal, allowDecimals: boolean, correctionFactor: number) => {
73
+ if (roughStep.lte(0)) {
74
+ return new Decimal(0);
75
+ }
76
+
77
+ const NICE_STEPS = [1, 2, 2.5, 5];
78
+
79
+ const roughNum = roughStep.toNumber();
80
+ const exponent = Math.floor(new Decimal(roughNum).abs().log(10).toNumber());
81
+ let magnitude = new Decimal(10).pow(exponent);
82
+
83
+ // normalized is in the range [1, 10)
84
+ const normalized = roughStep.div(magnitude).toNumber();
85
+
86
+ // Find the smallest nice step >= normalized (ceiling)
87
+ let niceIdx = NICE_STEPS.findIndex(s => s >= normalized - 1e-10);
88
+ if (niceIdx === -1) {
89
+ // normalized > 5 (e.g. 7.3), move to next order of magnitude
90
+ magnitude = magnitude.mul(10);
91
+ niceIdx = 0;
92
+ }
93
+
94
+ // Apply correction factor by stepping through the nice number sequence
95
+ niceIdx += correctionFactor;
96
+ if (niceIdx >= NICE_STEPS.length) {
97
+ const extraMag = Math.floor(niceIdx / NICE_STEPS.length);
98
+ niceIdx %= NICE_STEPS.length;
99
+ magnitude = magnitude.mul(new Decimal(10).pow(extraMag));
100
+ }
101
+
102
+ const niceStep = NICE_STEPS[niceIdx] ?? 1;
103
+ const formatStep = new Decimal(niceStep).mul(magnitude);
104
+
105
+ return allowDecimals ? formatStep : new Decimal(Math.ceil(formatStep.toNumber()));
106
+ };
107
+
108
+ /**
109
+ * calculate the ticks when the minimum value equals to the maximum value
110
+ *
111
+ * @param value The minimum value which is also the maximum value
112
+ * @param tickCount The count of ticks
113
+ * @param allowDecimals Allow the ticks to be decimals or not
114
+ * @return array of ticks
115
+ */
116
+ export const getTickOfSingleValue = (value: number, tickCount: number, allowDecimals: boolean): Array<number> => {
117
+ let step: Decimal = new Decimal(1);
118
+ // calculate the middle value of ticks
119
+ let middle = new Decimal(value);
120
+
121
+ if (!middle.isint() && allowDecimals) {
122
+ const absVal = Math.abs(value);
123
+
124
+ if (absVal < 1) {
125
+ // The step should be a float number when the difference is smaller than 1
126
+ step = new Decimal(10).pow(getDigitCount(value) - 1);
127
+
128
+ middle = new Decimal(Math.floor(middle.div(step).toNumber())).mul(step);
129
+ } else if (absVal > 1) {
130
+ // Return the maximum integer which is smaller than 'value' when 'value' is greater than 1
131
+ middle = new Decimal(Math.floor(value));
132
+ }
133
+ } else if (value === 0) {
134
+ middle = new Decimal(Math.floor((tickCount - 1) / 2));
135
+ } else if (!allowDecimals) {
136
+ middle = new Decimal(Math.floor(value));
137
+ }
138
+
139
+ const middleIndex = Math.floor((tickCount - 1) / 2);
140
+ const ticks: Array<number> = [];
141
+
142
+ for (let i = 0; i < tickCount; i++) {
143
+ ticks.push(middle.add(new Decimal(i - middleIndex).mul(step)).toNumber());
144
+ }
145
+
146
+ return ticks;
147
+ };
148
+
149
+ /**
150
+ * Calculate the step
151
+ *
152
+ * @param min The minimum value of an interval
153
+ * @param max The maximum value of an interval
154
+ * @param tickCount The count of ticks
155
+ * @param allowDecimals Allow the ticks to be decimals or not
156
+ * @param correctionFactor A correction factor
157
+ * @return The step, minimum value of ticks, maximum value of ticks
158
+ */
159
+ export const calculateStep = (
160
+ min: number,
161
+ max: number,
162
+ tickCount: number,
163
+ allowDecimals: boolean,
164
+ correctionFactor: number = 0,
165
+ stepFn: StepFunction = getAdaptiveStep,
166
+ ): {
167
+ step: Decimal;
168
+ tickMin: Decimal;
169
+ tickMax: Decimal;
170
+ } => {
171
+ // dirty hack (for recharts' test)
172
+ if (!Number.isFinite((max - min) / (tickCount - 1))) {
173
+ return {
174
+ step: new Decimal(0),
175
+ tickMin: new Decimal(0),
176
+ tickMax: new Decimal(0),
177
+ };
178
+ }
179
+
180
+ // The step which is easy to understand between two ticks
181
+ const step = stepFn(new Decimal(max).sub(min).div(tickCount - 1), allowDecimals, correctionFactor);
182
+
183
+ // A medial value of ticks
184
+ let middle;
185
+
186
+ // When 0 is inside the interval, 0 should be a tick
187
+ if (min <= 0 && max >= 0) {
188
+ middle = new Decimal(0);
189
+ } else {
190
+ // calculate the middle value
191
+ middle = new Decimal(min).add(max).div(2);
192
+ // minus modulo value
193
+ middle = middle.sub(new Decimal(middle).mod(step));
194
+ }
195
+
196
+ let belowCount = Math.ceil(middle.sub(min).div(step).toNumber());
197
+ let upCount = Math.ceil(new Decimal(max).sub(middle).div(step).toNumber());
198
+ const scaleCount = belowCount + upCount + 1;
199
+
200
+ if (scaleCount > tickCount) {
201
+ // When more ticks need to cover the interval, step should be bigger.
202
+ return calculateStep(min, max, tickCount, allowDecimals, correctionFactor + 1, stepFn);
203
+ }
204
+ if (scaleCount < tickCount) {
205
+ // When less ticks can cover the interval, we should add some additional ticks
206
+ upCount = max > 0 ? upCount + (tickCount - scaleCount) : upCount;
207
+ belowCount = max > 0 ? belowCount : belowCount + (tickCount - scaleCount);
208
+ }
209
+
210
+ return {
211
+ step,
212
+ tickMin: middle.sub(new Decimal(belowCount).mul(step)),
213
+ tickMax: middle.add(new Decimal(upCount).mul(step)),
214
+ };
215
+ };
216
+
217
+ /**
218
+ * Calculate the ticks of an interval. Ticks can appear outside the interval
219
+ * if it makes them more rounded and nice.
220
+ *
221
+ * @param tuple of [min,max] min: The minimum value, max: The maximum value
222
+ * @param tickCount The count of ticks
223
+ * @param allowDecimals Allow the ticks to be decimals or not
224
+ * @param niceTicksMode The algorithm to use for calculating nice ticks.
225
+ * @return array of ticks
226
+ */
227
+ export const getNiceTickValues = (
228
+ [min, max]: NumberDomain,
229
+ tickCount = 6,
230
+ allowDecimals = true,
231
+ niceTicksMode: NiceTicksAlgorithm = 'auto',
232
+ ): number[] => {
233
+ // More than two ticks should be return
234
+ const count = Math.max(tickCount, 2);
235
+ const [cormin, cormax] = getValidInterval([min, max]);
236
+
237
+ if (cormin === -Infinity || cormax === Infinity) {
238
+ const values: Array<number> =
239
+ cormax === Infinity
240
+ ? [cormin, ...Array(tickCount - 1).fill(Infinity)]
241
+ : [...Array(tickCount - 1).fill(-Infinity), cormax];
242
+
243
+ return min > max ? values.reverse() : values;
244
+ }
245
+
246
+ if (cormin === cormax) {
247
+ return getTickOfSingleValue(cormin, tickCount, allowDecimals);
248
+ }
249
+
250
+ const stepFn = niceTicksMode === 'snap125' ? getSnap125Step : getAdaptiveStep;
251
+
252
+ // Get the step between two ticks
253
+ const { step, tickMin, tickMax } = calculateStep(cormin, cormax, count, allowDecimals, 0, stepFn);
254
+
255
+ const values = rangeStep(tickMin, tickMax.add(new Decimal(0.1).mul(step)), step);
256
+
257
+ return min > max ? values.reverse() : values;
258
+ };
259
+
260
+ /**
261
+ * Calculate the ticks of an interval.
262
+ * Ticks will be constrained to the interval [min, max] even if it makes them less rounded and nice.
263
+ *
264
+ * @param tuple of [min,max] min: The minimum value, max: The maximum value
265
+ * @param tickCount The count of ticks. This function may return less than tickCount ticks if the interval is too small.
266
+ * @param allowDecimals Allow the ticks to be decimals or not
267
+ * @param niceTicksMode The algorithm to use for calculating nice ticks. See {@link NiceTicksAlgorithm}.
268
+ * @return array of ticks
269
+ */
270
+ export const getTickValuesFixedDomain = (
271
+ [min, max]: NumberDomain,
272
+ tickCount: number,
273
+ allowDecimals = true,
274
+ niceTicksMode: NiceTicksAlgorithm = 'auto',
275
+ ) => {
276
+ // More than two ticks should be return
277
+ const [cormin, cormax] = getValidInterval([min, max]);
278
+
279
+ if (cormin === -Infinity || cormax === Infinity) {
280
+ return [min, max];
281
+ }
282
+
283
+ if (cormin === cormax) {
284
+ return [cormin];
285
+ }
286
+
287
+ const stepFn = niceTicksMode === 'snap125' ? getSnap125Step : getAdaptiveStep;
288
+ const count = Math.max(tickCount, 2);
289
+ const step = stepFn(new Decimal(cormax).sub(cormin).div(count - 1), allowDecimals, 0);
290
+ let values = [...rangeStep(new Decimal(cormin), new Decimal(cormax), step), cormax];
291
+
292
+ if (allowDecimals === false) {
293
+ /*
294
+ * allowDecimals is false means that we want to have integer ticks.
295
+ * The step is guaranteed to be an integer in the code above which is great start
296
+ * but when the first step is not an integer, it will start stepping from a decimal value anyway.
297
+ * So we need to round all the values to integers after the fact.
298
+ * The domain boundary (cormax) is appended after the rangeStep values. When
299
+ * cormax rounds down to the same integer as the last rangeStep value, we end up
300
+ * with a duplicate trailing tick. Remove it.
301
+ */
302
+ values = values.map(value => Math.round(value));
303
+ const last = values.length - 1;
304
+ if (last > 0 && values[last] === values[last - 1]) {
305
+ values = values.slice(0, last);
306
+ }
307
+ }
308
+
309
+ return min > max ? values.reverse() : values;
310
+ };
@@ -0,0 +1,54 @@
1
+ /**
2
+ * @fileOverview Some common arithmetic methods
3
+ * @author xile611
4
+ * @date 2015-09-17
5
+ */
6
+ import Decimal from 'decimal.js-light';
7
+
8
+ /**
9
+ * Get the digit count of a number.
10
+ * If the absolute value is in the interval [0.1, 1), the result is 0.
11
+ * If the absolute value is in the interval [0.01, 0.1), the digit count is -1.
12
+ * If the absolute value is in the interval [0.001, 0.01), the digit count is -2.
13
+ *
14
+ * @param {Number} value The number
15
+ * @return {Integer} Digit count
16
+ */
17
+ function getDigitCount(value: number) {
18
+ let result;
19
+
20
+ if (value === 0) {
21
+ result = 1;
22
+ } else {
23
+ result = Math.floor(new Decimal(value).abs().log(10).toNumber()) + 1;
24
+ }
25
+
26
+ return result;
27
+ }
28
+
29
+ /**
30
+ * Get the data in the interval [start, end) with a fixed step.
31
+ * Also handles JS calculation precision issues.
32
+ *
33
+ * @param {Decimal} start Start point
34
+ * @param {Decimal} end End point, not included
35
+ * @param {Decimal} step Step size
36
+ * @return {Array} Array of numbers
37
+ */
38
+ function rangeStep(start: Decimal, end: Decimal, step: Decimal): Array<number> {
39
+ let num = new Decimal(start);
40
+ let i = 0;
41
+ const result: Array<number> = [];
42
+
43
+ // magic number to prevent infinite loop
44
+ while (num.lt(end) && i < 100000) {
45
+ result.push(num.toNumber());
46
+
47
+ num = num.add(step);
48
+ i++;
49
+ }
50
+
51
+ return result;
52
+ }
53
+
54
+ export { rangeStep, getDigitCount };
@@ -0,0 +1,5 @@
1
+ // Type shim for the verbatim recharts copies in this vendor tree: the
2
+ // original `src/util/scale/getNiceTickValues.ts` imports NumberDomain from
3
+ // `../types`; this file provides ONLY that type (from recharts
4
+ // src/util/types.ts v3.9.2) so the copies bundle without modification.
5
+ export type NumberDomain = readonly [min: number, max: number];
metadata ADDED
@@ -0,0 +1,186 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: poetry-charts
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.2
5
+ platform: ruby
6
+ authors:
7
+ - Matt Solt
8
+ bindir: bin
9
+ cert_chain: []
10
+ date: 1980-01-02 00:00:00.000000000 Z
11
+ dependencies:
12
+ - !ruby/object:Gem::Dependency
13
+ name: poetry-core
14
+ requirement: !ruby/object:Gem::Requirement
15
+ requirements:
16
+ - - '='
17
+ - !ruby/object:Gem::Version
18
+ version: 0.0.2
19
+ type: :runtime
20
+ prerelease: false
21
+ version_requirements: !ruby/object:Gem::Requirement
22
+ requirements:
23
+ - - '='
24
+ - !ruby/object:Gem::Version
25
+ version: 0.0.2
26
+ description: Charts whose geometry is computed on the server (Ruby; d3-scale/d3-shape
27
+ semantics, recharts' nice ticks) and shipped as finished SVG - no-JS valid, CSS-variable
28
+ themed, zero client chart math. Stimulus chrome reads server-embedded coordinates
29
+ for tooltips and legends; engines stay swappable behind a closed, versioned chart-spec
30
+ (Chart.js reference adapter).
31
+ email:
32
+ - mattsolt@gmail.com
33
+ executables: []
34
+ extensions: []
35
+ extra_rdoc_files: []
36
+ files:
37
+ - ".gitattributes"
38
+ - CHANGELOG.md
39
+ - LICENSE.txt
40
+ - README.md
41
+ - THIRD_PARTY_NOTICES.md
42
+ - app/assets/stylesheets/poetry-charts.css
43
+ - app/components/poetry/charts/adapter_chart/component.html.erb
44
+ - app/components/poetry/charts/adapter_chart/component.rb
45
+ - app/components/poetry/charts/adapter_chart/preview.rb
46
+ - app/components/poetry/charts/adapter_chart/style.rb
47
+ - app/components/poetry/charts/area_chart/component.html.erb
48
+ - app/components/poetry/charts/area_chart/component.rb
49
+ - app/components/poetry/charts/area_chart/preview.rb
50
+ - app/components/poetry/charts/area_chart/style.rb
51
+ - app/components/poetry/charts/bar_chart/component.html.erb
52
+ - app/components/poetry/charts/bar_chart/component.rb
53
+ - app/components/poetry/charts/bar_chart/preview.rb
54
+ - app/components/poetry/charts/bar_chart/style.rb
55
+ - app/components/poetry/charts/bar_math.rb
56
+ - app/components/poetry/charts/cartesian_family.rb
57
+ - app/components/poetry/charts/chart_family.rb
58
+ - app/components/poetry/charts/composed_chart/component.html.erb
59
+ - app/components/poetry/charts/composed_chart/component.rb
60
+ - app/components/poetry/charts/composed_chart/preview.rb
61
+ - app/components/poetry/charts/composed_chart/style.rb
62
+ - app/components/poetry/charts/container/component.html.erb
63
+ - app/components/poetry/charts/container/component.rb
64
+ - app/components/poetry/charts/container/preview.rb
65
+ - app/components/poetry/charts/container/style.rb
66
+ - app/components/poetry/charts/error_bars.rb
67
+ - app/components/poetry/charts/legend_content/component.html.erb
68
+ - app/components/poetry/charts/legend_content/component.rb
69
+ - app/components/poetry/charts/legend_content/preview.rb
70
+ - app/components/poetry/charts/legend_content/style.rb
71
+ - app/components/poetry/charts/line_chart/component.html.erb
72
+ - app/components/poetry/charts/line_chart/component.rb
73
+ - app/components/poetry/charts/line_chart/preview.rb
74
+ - app/components/poetry/charts/line_chart/style.rb
75
+ - app/components/poetry/charts/live.rb
76
+ - app/components/poetry/charts/motion.rb
77
+ - app/components/poetry/charts/pie_chart/component.html.erb
78
+ - app/components/poetry/charts/pie_chart/component.rb
79
+ - app/components/poetry/charts/pie_chart/preview.rb
80
+ - app/components/poetry/charts/pie_chart/style.rb
81
+ - app/components/poetry/charts/polar_family.rb
82
+ - app/components/poetry/charts/radar_chart/component.html.erb
83
+ - app/components/poetry/charts/radar_chart/component.rb
84
+ - app/components/poetry/charts/radar_chart/preview.rb
85
+ - app/components/poetry/charts/radar_chart/style.rb
86
+ - app/components/poetry/charts/radial_bar_chart/component.html.erb
87
+ - app/components/poetry/charts/radial_bar_chart/component.rb
88
+ - app/components/poetry/charts/radial_bar_chart/preview.rb
89
+ - app/components/poetry/charts/radial_bar_chart/style.rb
90
+ - app/components/poetry/charts/reference_marks.rb
91
+ - app/components/poetry/charts/scatter_chart/component.html.erb
92
+ - app/components/poetry/charts/scatter_chart/component.rb
93
+ - app/components/poetry/charts/scatter_chart/preview.rb
94
+ - app/components/poetry/charts/scatter_chart/style.rb
95
+ - app/components/poetry/charts/tooltip_content/component.html.erb
96
+ - app/components/poetry/charts/tooltip_content/component.rb
97
+ - app/components/poetry/charts/tooltip_content/preview.rb
98
+ - app/components/poetry/charts/tooltip_content/style.rb
99
+ - app/components/poetry/charts/tooltip_layer/component.html.erb
100
+ - app/components/poetry/charts/tooltip_layer/component.rb
101
+ - app/components/poetry/charts/tooltip_layer/style.rb
102
+ - app/components/poetry/charts/tooltip_wiring.rb
103
+ - app/helpers/poetry/charts/components_helper.rb
104
+ - app/javascript/poetry/charts/adapter_controller.js
105
+ - app/javascript/poetry/charts/adapter_registry.js
106
+ - app/javascript/poetry/charts/adapters/chartjs.js
107
+ - app/javascript/poetry/charts/d3.js
108
+ - app/javascript/poetry/charts/index.js
109
+ - app/javascript/poetry/charts/live/renderer.js
110
+ - app/javascript/poetry/charts/live_controller.js
111
+ - app/javascript/poetry/charts/motion/flip.js
112
+ - app/javascript/poetry/charts/motion/sector.js
113
+ - app/javascript/poetry/charts/motion/tween.js
114
+ - app/javascript/poetry/charts/motion_controller.js
115
+ - app/javascript/poetry/charts/tooltip_controller.js
116
+ - app/javascript/poetry/charts/window_controller.js
117
+ - config/component_descriptions.yml
118
+ - config/component_registry.yml
119
+ - config/controllers_manifest.json
120
+ - config/importmap.rb
121
+ - lib/poetry-charts.rb
122
+ - lib/poetry/charts.rb
123
+ - lib/poetry/charts/cartesian.rb
124
+ - lib/poetry/charts/config.rb
125
+ - lib/poetry/charts/engine.rb
126
+ - lib/poetry/charts/geometry.rb
127
+ - lib/poetry/charts/geometry/area.rb
128
+ - lib/poetry/charts/geometry/curve.rb
129
+ - lib/poetry/charts/geometry/line.rb
130
+ - lib/poetry/charts/geometry/nice_ticks.rb
131
+ - lib/poetry/charts/geometry/path.rb
132
+ - lib/poetry/charts/geometry/scale/band.rb
133
+ - lib/poetry/charts/geometry/scale/linear.rb
134
+ - lib/poetry/charts/geometry/stack.rb
135
+ - lib/poetry/charts/geometry/ticks.rb
136
+ - lib/poetry/charts/polar.rb
137
+ - lib/poetry/charts/spec.rb
138
+ - lib/poetry/charts/theme_style.rb
139
+ - lib/poetry/charts/version.rb
140
+ - themes/default.css
141
+ - themes/luma.css
142
+ - themes/lyra.css
143
+ - themes/maia.css
144
+ - themes/mira.css
145
+ - themes/nova.css
146
+ - themes/rhea.css
147
+ - themes/sera.css
148
+ - themes/vega.css
149
+ - vendor/d3-kernel/LICENSE-d3.txt
150
+ - vendor/d3-kernel/LICENSE-decimal.js-light.txt
151
+ - vendor/d3-kernel/LICENSE-recharts.txt
152
+ - vendor/d3-kernel/README.md
153
+ - vendor/d3-kernel/build.mjs
154
+ - vendor/d3-kernel/entry.js
155
+ - vendor/d3-kernel/recharts/state/cartesianAxisSlice.ts
156
+ - vendor/d3-kernel/recharts/util/scale/getNiceTickValues.ts
157
+ - vendor/d3-kernel/recharts/util/scale/util/arithmetic.ts
158
+ - vendor/d3-kernel/recharts/util/types.ts
159
+ homepage: https://poetryui.com
160
+ licenses:
161
+ - MIT
162
+ metadata:
163
+ homepage_uri: https://poetryui.com
164
+ documentation_uri: https://poetryui.com/docs
165
+ source_code_uri: https://github.com/roboruby/poetry-charts
166
+ changelog_uri: https://github.com/roboruby/poetry-charts/blob/main/CHANGELOG.md
167
+ bug_tracker_uri: https://github.com/roboruby/poetry-charts/issues
168
+ rubygems_mfa_required: 'true'
169
+ rdoc_options: []
170
+ require_paths:
171
+ - lib
172
+ required_ruby_version: !ruby/object:Gem::Requirement
173
+ requirements:
174
+ - - ">="
175
+ - !ruby/object:Gem::Version
176
+ version: 3.4.0
177
+ required_rubygems_version: !ruby/object:Gem::Requirement
178
+ requirements:
179
+ - - ">="
180
+ - !ruby/object:Gem::Version
181
+ version: '0'
182
+ requirements: []
183
+ rubygems_version: 4.0.16
184
+ specification_version: 4
185
+ summary: 'Poetry''s chart tier: server-rendered SVG charts for Rails.'
186
+ test_files: []