@fusion.dev/helix-headless 0.40.0 → 0.41.1
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.
- package/custom-elements.json +262 -25
- package/dist/area-chart/root/area-chart-root.d.ts +25 -5
- package/dist/area-chart/root/area-chart-root.js +2 -3
- package/dist/bar-chart/root/bar-chart-root.d.ts +29 -19
- package/dist/bar-chart/root/bar-chart-root.js +4 -10
- package/dist/donut-chart/root/donut-chart-root.d.ts +9 -1
- package/dist/donut-chart/root/donut-chart-root.js +2 -2
- package/dist/legend/root/legend-root.d.ts +16 -2
- package/dist/legend/root/legend-root.js +4 -3
- package/dist/line-chart/root/line-chart-root.d.ts +17 -3
- package/dist/line-chart/root/line-chart-root.js +1 -1
- package/dist/scatter-chart/root/scatter-chart-root.d.ts +17 -1
- package/dist/scatter-chart/root/scatter-chart-root.js +6 -3
- package/package.json +5 -5
- package/types/jsx.d.ts +617 -109
- package/types/vue.d.ts +79 -33
package/custom-elements.json
CHANGED
|
@@ -2235,7 +2235,7 @@
|
|
|
2235
2235
|
"declarations": [
|
|
2236
2236
|
{
|
|
2237
2237
|
"kind": "class",
|
|
2238
|
-
"description": "The chart for a composition: every column of the table is a part, the parts\nsum to the whole at each reading, and the top edge is that whole. What a line\nchart of the same table cannot show is the share, which here is the\nthickness of a band.\n\n**Not `Line Chart` with `area`.** That washes each series from the floor on\nits own, so the series overlap; this adds them. Reach for `Line Chart` when\nthe question is how each series moved, and for this when it is how the whole\nis made up.\n\n**It measures from zero, always**, which is `BarChart`'s rule and for the same\nreason: a band's thickness *is* its value, so a range that starts anywhere\nelse draws every part in proportion to nothing. `LineChart` measures from its\nown range because a line claims a position; a band claims an amount.\n\n**Straight between readings unless asked otherwise.** A band's top edge is a\nsum, and a curve fitted through one sum can pass under the curve fitted\nthrough the sum beneath it, so a smoothed stack can draw a part as less than\nnothing between two readings. Straight segments between ordered points stay\nordered. `curve=\"smooth\"` is there for a stack that is read as a shape.\n\n**`share` draws each reading as a hundred percent**, so the bands are the\nparts' shares and the top edge is flat. It answers \"which part grew\" where\nthe default answers \"did the whole grow\".\n\n**What a reader without the picture is told is the total and the share**, not\nevery band in turn. The table beside the chart already reads out every\nnumber; what the drawing adds is the composition, so the summary says the\nlatest reading's total and each part's share of it. The drawing itself is\n`aria-hidden`.\n\nEvery numeric column is a part. A table that carries its own total column\nwould count it twice, so leave it out of the table the chart reads.\nA negative reading is drawn as none: a part of a whole cannot be less than\nnothing, and a band that folded under its neighbor would say it was.",
|
|
2238
|
+
"description": "The chart for a composition: every column of the table is a part, the parts\nsum to the whole at each reading, and the top edge is that whole. What a line\nchart of the same table cannot show is the share, which here is the\nthickness of a band.\n\n**Not `Line Chart` with `area`.** That washes each series from the floor on\nits own, so the series overlap; this adds them. Reach for `Line Chart` when\nthe question is how each series moved, and for this when it is how the whole\nis made up.\n\n**It measures from zero, always**, which is `BarChart`'s rule and for the same\nreason: a band's thickness *is* its value, so a range that starts anywhere\nelse draws every part in proportion to nothing. `LineChart` measures from its\nown range because a line claims a position; a band claims an amount.\n\n**And so it is not a streamgraph**, which is the near neighbor to name.\nA streamgraph moves its baseline to center the bands and reads as a river; it\nis a real form and it is the one thing the rule above refuses, so this\ncarries no alias for it. What it has instead is `share`, which answers the\nquestion a streamgraph is usually reached for, how the composition changed,\nwithout giving up a floor a reader can measure against.\n\n**Straight between readings unless asked otherwise.** A band's top edge is a\nsum, and a curve fitted through one sum can pass under the curve fitted\nthrough the sum beneath it, so a smoothed stack can draw a part as less than\nnothing between two readings. Straight segments between ordered points stay\nordered. `curve=\"smooth\"` is there for a stack that is read as a shape.\n\n`curve=\"step\"` falls on the safe side of that argument rather than being\nunanswered by it, and it is worth saying which side because a reader cannot\ntell from the argument alone. A step takes no value the readings do not have:\nit holds one, jumps at the midpoint, and holds the next. So two stepped edges\nthat are ordered at every reading are ordered everywhere between them, which\nis what `straight` is chosen for. It is the curve for a quantity that changes\nat a moment rather than across an interval, a headcount or a price, where a\nsloped edge claims a gradual change nothing measured.\n\n**`share` draws each reading as a hundred percent**, so the bands are the\nparts' shares and the top edge is flat. It answers \"which part grew\" where\nthe default answers \"did the whole grow\".\n\n**What a reader without the picture is told is the total and the share**, not\nevery band in turn. The table beside the chart already reads out every\nnumber; what the drawing adds is the composition, so the summary says the\nlatest reading's total and each part's share of it. The drawing itself is\n`aria-hidden`.\n\nEvery numeric column is a part. A table that carries its own total column\nwould count it twice, so leave it out of the table the chart reads.\nA negative reading is drawn as none: a part of a whole cannot be less than\nnothing, and a band that folded under its neighbor would say it was.",
|
|
2239
2239
|
"name": "HelixHeadlessAreaChart",
|
|
2240
2240
|
"cssParts": [
|
|
2241
2241
|
{
|
|
@@ -2350,7 +2350,7 @@
|
|
|
2350
2350
|
"type": {
|
|
2351
2351
|
"text": "Curve | undefined"
|
|
2352
2352
|
},
|
|
2353
|
-
"description": "How a band's edge gets from one reading to the next.\n\
|
|
2353
|
+
"description": "How a band's edge gets from one reading to the next.\n\nThree values, and the class doc argues for each: `straight` is absent and\nis the default, `smooth` is for a stack read as a shape and is the one that\ncan draw a part as less than nothing, `step` is for a quantity that changes\nat a moment and is ordered the way `straight` is.\n\nAbsent rather than defaulted because a reflecting property with a default\nwrites its attribute onto every host, including the ones nobody configured.",
|
|
2354
2354
|
"attribute": "curve",
|
|
2355
2355
|
"reflects": true
|
|
2356
2356
|
},
|
|
@@ -2754,6 +2754,44 @@
|
|
|
2754
2754
|
"module": "src/mixins/mixin-chart-source/mixin-chart-source.ts"
|
|
2755
2755
|
}
|
|
2756
2756
|
},
|
|
2757
|
+
{
|
|
2758
|
+
"kind": "field",
|
|
2759
|
+
"name": "plottedColumns",
|
|
2760
|
+
"type": {
|
|
2761
|
+
"text": "number[]"
|
|
2762
|
+
},
|
|
2763
|
+
"description": "Which cells of a row hold numbers, by their place in it, in table order.\n\nThe same test `readSeries` applies when it drops a column of notes: a\ncolumn is a series where any row parses, so a series survives one blank\ncell and a column of words is never one.",
|
|
2764
|
+
"readonly": true,
|
|
2765
|
+
"inheritedFrom": {
|
|
2766
|
+
"name": "MixinChartSource",
|
|
2767
|
+
"module": "src/mixins/mixin-chart-source/mixin-chart-source.ts"
|
|
2768
|
+
}
|
|
2769
|
+
},
|
|
2770
|
+
{
|
|
2771
|
+
"kind": "method",
|
|
2772
|
+
"name": "seriesOf",
|
|
2773
|
+
"return": {
|
|
2774
|
+
"type": {
|
|
2775
|
+
"text": "number | undefined"
|
|
2776
|
+
}
|
|
2777
|
+
},
|
|
2778
|
+
"parameters": [
|
|
2779
|
+
{
|
|
2780
|
+
"name": "cell",
|
|
2781
|
+
"type": {
|
|
2782
|
+
"text": "number"
|
|
2783
|
+
}
|
|
2784
|
+
}
|
|
2785
|
+
],
|
|
2786
|
+
"description": "The palette slot the cell at this place in a row is drawn in.\n\n**A cell's place in its row is not its series' depth, and the tooltip\nspent a while assuming it was.** `readSeries` drops a column nothing\nparses and `readRows` keeps it, so one column of notes among the figures\nmoves every column after it one color along in the bubble: a row reading\n`Referral 1,080` wearing series three's green beside a legend that says\nseries three is something else, which is the one failure the dot exists\nto prevent.\n\nOverridden where a chart reads the table some other way. `ScatterChart`\nsplits the first plotted column off as the measure across, so its first\n*plotted* series is this table's second numeric column.",
|
|
2787
|
+
"inheritedFrom": {
|
|
2788
|
+
"name": "MixinChartSource",
|
|
2789
|
+
"module": "src/mixins/mixin-chart-source/mixin-chart-source.ts"
|
|
2790
|
+
},
|
|
2791
|
+
"type": {
|
|
2792
|
+
"text": "seriesOf(cell: number) => number | undefined"
|
|
2793
|
+
}
|
|
2794
|
+
},
|
|
2757
2795
|
{
|
|
2758
2796
|
"kind": "field",
|
|
2759
2797
|
"name": "readings",
|
|
@@ -3098,7 +3136,7 @@
|
|
|
3098
3136
|
"type": {
|
|
3099
3137
|
"text": "Curve | undefined"
|
|
3100
3138
|
},
|
|
3101
|
-
"description": "How a band's edge gets from one reading to the next.\n\
|
|
3139
|
+
"description": "How a band's edge gets from one reading to the next.\n\nThree values, and the class doc argues for each: `straight` is absent and\nis the default, `smooth` is for a stack read as a shape and is the one that\ncan draw a part as less than nothing, `step` is for a quantity that changes\nat a moment and is ordered the way `straight` is.\n\nAbsent rather than defaulted because a reflecting property with a default\nwrites its attribute onto every host, including the ones nobody configured.",
|
|
3102
3140
|
"fieldName": "curve"
|
|
3103
3141
|
},
|
|
3104
3142
|
{
|
|
@@ -3168,12 +3206,12 @@
|
|
|
3168
3206
|
"helix": {
|
|
3169
3207
|
"category": "charts",
|
|
3170
3208
|
"since": "0.1.0",
|
|
3171
|
-
"status": "
|
|
3209
|
+
"status": "stable",
|
|
3172
3210
|
"documentation": "https://fusion.dev/helix/components/area-chart",
|
|
3173
3211
|
"aliases": [
|
|
3174
3212
|
"Stacked Area Chart",
|
|
3175
3213
|
"Composition Chart",
|
|
3176
|
-
"
|
|
3214
|
+
"Banded Chart"
|
|
3177
3215
|
],
|
|
3178
3216
|
"tier": "headless",
|
|
3179
3217
|
"group": "BaseAreaChart",
|
|
@@ -4797,7 +4835,7 @@
|
|
|
4797
4835
|
"name": "HelixHeadlessBarChart",
|
|
4798
4836
|
"cssProperties": [
|
|
4799
4837
|
{
|
|
4800
|
-
"description": "
|
|
4838
|
+
"description": "How wide an axis column is drawn, in `ch`, from the widest number on it. Written on the axis itself, and only where the categories run along the bottom: turned sideways an axis is a row and takes a line's height instead.",
|
|
4801
4839
|
"name": "--bar-chart-axis"
|
|
4802
4840
|
},
|
|
4803
4841
|
{
|
|
@@ -4961,7 +4999,7 @@
|
|
|
4961
4999
|
"type": {
|
|
4962
5000
|
"text": "string | undefined"
|
|
4963
5001
|
},
|
|
4964
|
-
"description": "Which series are drawn as a line instead of as columns, by name.\n\
|
|
5002
|
+
"description": "Which series are drawn as a line instead of as columns, by name.\n\nSeparated by whitespace or commas and matched against the column headings\nthe table gives, so a chart says `lines=\"Margin\"` rather than counting\ncolumns. Names because they are what the table already carries and what the\nlegend already shows: an index is a fourth place the column order is\nwritten down and the first one to go stale when somebody moves a column.\n\n**This says which mark a series takes and nothing about which scale it is\nmeasured on.** Named here alone, a line shares the columns' domain, so it\nsays something comparable to the columns beside it.\n\nThe other half of a combination chart, a count against a percentage on a\nscale of its own, is `secondary`, which is a separate property because it\nis a separate question and because the two compose: `with-a-second-axis`\nships naming one series in both. The argument for why a second scale is opt\nin, and why setting it labels both axes, is written there.\n\nA line among columns measures from zero, because the columns do and they\nshare the axis. So does a line on the second scale, which is that scale's\nown rule rather than this one's.",
|
|
4965
5003
|
"attribute": "lines"
|
|
4966
5004
|
},
|
|
4967
5005
|
{
|
|
@@ -4970,7 +5008,7 @@
|
|
|
4970
5008
|
"type": {
|
|
4971
5009
|
"text": "string | undefined"
|
|
4972
5010
|
},
|
|
4973
|
-
"description": "Which series are measured against a scale of their own, by name.\n\
|
|
5011
|
+
"description": "Which series are measured against a scale of their own, by name.\n\nSeparated and matched the way `lines` is, against the column headings the\ntable gives. Opt in: absent, every series shares one domain, which is what\nmakes a chart comparable and is the right default.\n\n**The scale, and `lines` is the mark.** The two are separate properties\nbecause they answer separate questions and a series usually wants both:\na percentage beside a count is drawn as a line *and* measured on its own\naxis, which is what `with-a-second-axis` writes out. Neither implies the\nother, so a series can be a line on the shared scale and a column can have\na scale to itself.\n\n**Two scales on one frame let an author put any two shapes in any relation\nby choosing the ranges, and a reader cannot see it happening.** That is not\na caveat, it is what the feature does: a line that crosses the columns\ntwice and a line that never touches them can be the same two series drawn\nagainst different ranges. It earns its place when the two quantities are\ngenuinely incomparable, a count against a percentage, and it is a way to\nmislead in every other case.\n\n**So it draws its axes**, and that is not optional here. The chart renders\nno value axis at all when there is one scale, because the columns are\nmeasured against each other and a reader needs no numbers to do that. With\ntwo, a reader has no way of knowing there are two, let alone which series\nis on which, so both scales are labeled the moment this is set. An\nunlabeled second axis is the deceptive case rather than the tidy one.\n\nThe grid stays on the primary axis, since a rule measured against two\nscales at once is a rule that means nothing. The tooltip is unaffected: it\nhas always shown every column's own number, which is the reader's way out\nof any scale question the picture raises.",
|
|
4974
5012
|
"attribute": "secondary",
|
|
4975
5013
|
"reflects": true
|
|
4976
5014
|
},
|
|
@@ -5338,6 +5376,44 @@
|
|
|
5338
5376
|
"module": "src/mixins/mixin-chart-source/mixin-chart-source.ts"
|
|
5339
5377
|
}
|
|
5340
5378
|
},
|
|
5379
|
+
{
|
|
5380
|
+
"kind": "field",
|
|
5381
|
+
"name": "plottedColumns",
|
|
5382
|
+
"type": {
|
|
5383
|
+
"text": "number[]"
|
|
5384
|
+
},
|
|
5385
|
+
"description": "Which cells of a row hold numbers, by their place in it, in table order.\n\nThe same test `readSeries` applies when it drops a column of notes: a\ncolumn is a series where any row parses, so a series survives one blank\ncell and a column of words is never one.",
|
|
5386
|
+
"readonly": true,
|
|
5387
|
+
"inheritedFrom": {
|
|
5388
|
+
"name": "MixinChartSource",
|
|
5389
|
+
"module": "src/mixins/mixin-chart-source/mixin-chart-source.ts"
|
|
5390
|
+
}
|
|
5391
|
+
},
|
|
5392
|
+
{
|
|
5393
|
+
"kind": "method",
|
|
5394
|
+
"name": "seriesOf",
|
|
5395
|
+
"return": {
|
|
5396
|
+
"type": {
|
|
5397
|
+
"text": "number | undefined"
|
|
5398
|
+
}
|
|
5399
|
+
},
|
|
5400
|
+
"parameters": [
|
|
5401
|
+
{
|
|
5402
|
+
"name": "cell",
|
|
5403
|
+
"type": {
|
|
5404
|
+
"text": "number"
|
|
5405
|
+
}
|
|
5406
|
+
}
|
|
5407
|
+
],
|
|
5408
|
+
"description": "The palette slot the cell at this place in a row is drawn in.\n\n**A cell's place in its row is not its series' depth, and the tooltip\nspent a while assuming it was.** `readSeries` drops a column nothing\nparses and `readRows` keeps it, so one column of notes among the figures\nmoves every column after it one color along in the bubble: a row reading\n`Referral 1,080` wearing series three's green beside a legend that says\nseries three is something else, which is the one failure the dot exists\nto prevent.\n\nOverridden where a chart reads the table some other way. `ScatterChart`\nsplits the first plotted column off as the measure across, so its first\n*plotted* series is this table's second numeric column.",
|
|
5409
|
+
"inheritedFrom": {
|
|
5410
|
+
"name": "MixinChartSource",
|
|
5411
|
+
"module": "src/mixins/mixin-chart-source/mixin-chart-source.ts"
|
|
5412
|
+
},
|
|
5413
|
+
"type": {
|
|
5414
|
+
"text": "seriesOf(cell: number) => number | undefined"
|
|
5415
|
+
}
|
|
5416
|
+
},
|
|
5341
5417
|
{
|
|
5342
5418
|
"kind": "field",
|
|
5343
5419
|
"name": "readings",
|
|
@@ -5698,7 +5774,7 @@
|
|
|
5698
5774
|
"type": {
|
|
5699
5775
|
"text": "string | undefined"
|
|
5700
5776
|
},
|
|
5701
|
-
"description": "Which series are drawn as a line instead of as columns, by name.\n\
|
|
5777
|
+
"description": "Which series are drawn as a line instead of as columns, by name.\n\nSeparated by whitespace or commas and matched against the column headings\nthe table gives, so a chart says `lines=\"Margin\"` rather than counting\ncolumns. Names because they are what the table already carries and what the\nlegend already shows: an index is a fourth place the column order is\nwritten down and the first one to go stale when somebody moves a column.\n\n**This says which mark a series takes and nothing about which scale it is\nmeasured on.** Named here alone, a line shares the columns' domain, so it\nsays something comparable to the columns beside it.\n\nThe other half of a combination chart, a count against a percentage on a\nscale of its own, is `secondary`, which is a separate property because it\nis a separate question and because the two compose: `with-a-second-axis`\nships naming one series in both. The argument for why a second scale is opt\nin, and why setting it labels both axes, is written there.\n\nA line among columns measures from zero, because the columns do and they\nshare the axis. So does a line on the second scale, which is that scale's\nown rule rather than this one's.",
|
|
5702
5778
|
"fieldName": "lines"
|
|
5703
5779
|
},
|
|
5704
5780
|
{
|
|
@@ -5706,7 +5782,7 @@
|
|
|
5706
5782
|
"type": {
|
|
5707
5783
|
"text": "string | undefined"
|
|
5708
5784
|
},
|
|
5709
|
-
"description": "Which series are measured against a scale of their own, by name.\n\
|
|
5785
|
+
"description": "Which series are measured against a scale of their own, by name.\n\nSeparated and matched the way `lines` is, against the column headings the\ntable gives. Opt in: absent, every series shares one domain, which is what\nmakes a chart comparable and is the right default.\n\n**The scale, and `lines` is the mark.** The two are separate properties\nbecause they answer separate questions and a series usually wants both:\na percentage beside a count is drawn as a line *and* measured on its own\naxis, which is what `with-a-second-axis` writes out. Neither implies the\nother, so a series can be a line on the shared scale and a column can have\na scale to itself.\n\n**Two scales on one frame let an author put any two shapes in any relation\nby choosing the ranges, and a reader cannot see it happening.** That is not\na caveat, it is what the feature does: a line that crosses the columns\ntwice and a line that never touches them can be the same two series drawn\nagainst different ranges. It earns its place when the two quantities are\ngenuinely incomparable, a count against a percentage, and it is a way to\nmislead in every other case.\n\n**So it draws its axes**, and that is not optional here. The chart renders\nno value axis at all when there is one scale, because the columns are\nmeasured against each other and a reader needs no numbers to do that. With\ntwo, a reader has no way of knowing there are two, let alone which series\nis on which, so both scales are labeled the moment this is set. An\nunlabeled second axis is the deceptive case rather than the tidy one.\n\nThe grid stays on the primary axis, since a rule measured against two\nscales at once is a rule that means nothing. The tooltip is unaffected: it\nhas always shown every column's own number, which is the reader's way out\nof any scale question the picture raises.",
|
|
5710
5786
|
"fieldName": "secondary"
|
|
5711
5787
|
},
|
|
5712
5788
|
{
|
|
@@ -5750,7 +5826,7 @@
|
|
|
5750
5826
|
"helix": {
|
|
5751
5827
|
"category": "charts",
|
|
5752
5828
|
"since": "0.1.0",
|
|
5753
|
-
"status": "
|
|
5829
|
+
"status": "stable",
|
|
5754
5830
|
"documentation": "https://fusion.dev/helix/components/bar-chart",
|
|
5755
5831
|
"aliases": [
|
|
5756
5832
|
"Column Chart",
|
|
@@ -32925,9 +33001,8 @@
|
|
|
32925
33001
|
"type": {
|
|
32926
33002
|
"text": "'large' | 'none' | 'small' | undefined"
|
|
32927
33003
|
},
|
|
32928
|
-
"description": "How much is left open in the middle.\n\nAbsent is a ring with room for a total in it. `small` and `large` move the\nhole without moving the outer edge, so a chart keeps its footprint.\n\n**`none` is a pie**, and it is the same drawing rather than another one:\nthe radius follows the thickness, so the inner edge reaching the center is\nwhat closing the hole means. A pie reads less accurately than a ring, angle\nbeing harder to judge than length, but it is not *misleading* the way a bar\nmeasured from anything but zero is, which is why this is a value here and\nthe bar chart's baseline is not a property at all.\n\n**Geometry rather than a CSS hook.** The dash arithmetic needs the\ncircumference, which needs the radius, and reading a custom property means\n`getComputedStyle`, which is client-only: a server would draw a different\nring than the client. A plot's proportions are markup for the same reason\n`curve` is.",
|
|
32929
|
-
"attribute": "hole"
|
|
32930
|
-
"reflects": true
|
|
33004
|
+
"description": "How much is left open in the middle.\n\nAbsent is a ring with room for a total in it. `small` and `large` move the\nhole without moving the outer edge, so a chart keeps its footprint.\n\n**`none` is a pie**, and it is the same drawing rather than another one:\nthe radius follows the thickness, so the inner edge reaching the center is\nwhat closing the hole means. A pie reads less accurately than a ring, angle\nbeing harder to judge than length, but it is not *misleading* the way a bar\nmeasured from anything but zero is, which is why this is a value here and\nthe bar chart's baseline is not a property at all.\n\n**Geometry rather than a CSS hook.** The dash arithmetic needs the\ncircumference, which needs the radius, and reading a custom property means\n`getComputedStyle`, which is client-only: a server would draw a different\nring than the client. A plot's proportions are markup for the same reason\n`curve` is.\n\n**And so it does not reflect**, which is the same argument read forward. No\nselector on either tier asks about it and none can want to: everything the\nthickness decides is arithmetic done here and published as\n`--donut-chart-stroke`, which is a number a rule can do sums with where the\nword is not. Reflected, it wrote a value onto every host a script had set\nit on for nothing to read. `sweep` beside it is the converse and reflects,\nbecause three rules select on it.",
|
|
33005
|
+
"attribute": "hole"
|
|
32931
33006
|
},
|
|
32932
33007
|
{
|
|
32933
33008
|
"kind": "field",
|
|
@@ -33168,6 +33243,44 @@
|
|
|
33168
33243
|
"module": "src/mixins/mixin-chart-source/mixin-chart-source.ts"
|
|
33169
33244
|
}
|
|
33170
33245
|
},
|
|
33246
|
+
{
|
|
33247
|
+
"kind": "field",
|
|
33248
|
+
"name": "plottedColumns",
|
|
33249
|
+
"type": {
|
|
33250
|
+
"text": "number[]"
|
|
33251
|
+
},
|
|
33252
|
+
"description": "Which cells of a row hold numbers, by their place in it, in table order.\n\nThe same test `readSeries` applies when it drops a column of notes: a\ncolumn is a series where any row parses, so a series survives one blank\ncell and a column of words is never one.",
|
|
33253
|
+
"readonly": true,
|
|
33254
|
+
"inheritedFrom": {
|
|
33255
|
+
"name": "MixinChartSource",
|
|
33256
|
+
"module": "src/mixins/mixin-chart-source/mixin-chart-source.ts"
|
|
33257
|
+
}
|
|
33258
|
+
},
|
|
33259
|
+
{
|
|
33260
|
+
"kind": "method",
|
|
33261
|
+
"name": "seriesOf",
|
|
33262
|
+
"return": {
|
|
33263
|
+
"type": {
|
|
33264
|
+
"text": "number | undefined"
|
|
33265
|
+
}
|
|
33266
|
+
},
|
|
33267
|
+
"parameters": [
|
|
33268
|
+
{
|
|
33269
|
+
"name": "cell",
|
|
33270
|
+
"type": {
|
|
33271
|
+
"text": "number"
|
|
33272
|
+
}
|
|
33273
|
+
}
|
|
33274
|
+
],
|
|
33275
|
+
"description": "The palette slot the cell at this place in a row is drawn in.\n\n**A cell's place in its row is not its series' depth, and the tooltip\nspent a while assuming it was.** `readSeries` drops a column nothing\nparses and `readRows` keeps it, so one column of notes among the figures\nmoves every column after it one color along in the bubble: a row reading\n`Referral 1,080` wearing series three's green beside a legend that says\nseries three is something else, which is the one failure the dot exists\nto prevent.\n\nOverridden where a chart reads the table some other way. `ScatterChart`\nsplits the first plotted column off as the measure across, so its first\n*plotted* series is this table's second numeric column.",
|
|
33276
|
+
"inheritedFrom": {
|
|
33277
|
+
"name": "MixinChartSource",
|
|
33278
|
+
"module": "src/mixins/mixin-chart-source/mixin-chart-source.ts"
|
|
33279
|
+
},
|
|
33280
|
+
"type": {
|
|
33281
|
+
"text": "seriesOf(cell: number) => number | undefined"
|
|
33282
|
+
}
|
|
33283
|
+
},
|
|
33171
33284
|
{
|
|
33172
33285
|
"kind": "field",
|
|
33173
33286
|
"name": "readings",
|
|
@@ -33512,7 +33625,7 @@
|
|
|
33512
33625
|
"type": {
|
|
33513
33626
|
"text": "'large' | 'none' | 'small' | undefined"
|
|
33514
33627
|
},
|
|
33515
|
-
"description": "How much is left open in the middle.\n\nAbsent is a ring with room for a total in it. `small` and `large` move the\nhole without moving the outer edge, so a chart keeps its footprint.\n\n**`none` is a pie**, and it is the same drawing rather than another one:\nthe radius follows the thickness, so the inner edge reaching the center is\nwhat closing the hole means. A pie reads less accurately than a ring, angle\nbeing harder to judge than length, but it is not *misleading* the way a bar\nmeasured from anything but zero is, which is why this is a value here and\nthe bar chart's baseline is not a property at all.\n\n**Geometry rather than a CSS hook.** The dash arithmetic needs the\ncircumference, which needs the radius, and reading a custom property means\n`getComputedStyle`, which is client-only: a server would draw a different\nring than the client. A plot's proportions are markup for the same reason\n`curve` is.",
|
|
33628
|
+
"description": "How much is left open in the middle.\n\nAbsent is a ring with room for a total in it. `small` and `large` move the\nhole without moving the outer edge, so a chart keeps its footprint.\n\n**`none` is a pie**, and it is the same drawing rather than another one:\nthe radius follows the thickness, so the inner edge reaching the center is\nwhat closing the hole means. A pie reads less accurately than a ring, angle\nbeing harder to judge than length, but it is not *misleading* the way a bar\nmeasured from anything but zero is, which is why this is a value here and\nthe bar chart's baseline is not a property at all.\n\n**Geometry rather than a CSS hook.** The dash arithmetic needs the\ncircumference, which needs the radius, and reading a custom property means\n`getComputedStyle`, which is client-only: a server would draw a different\nring than the client. A plot's proportions are markup for the same reason\n`curve` is.\n\n**And so it does not reflect**, which is the same argument read forward. No\nselector on either tier asks about it and none can want to: everything the\nthickness decides is arithmetic done here and published as\n`--donut-chart-stroke`, which is a number a rule can do sums with where the\nword is not. Reflected, it wrote a value onto every host a script had set\nit on for nothing to read. `sweep` beside it is the converse and reflects,\nbecause three rules select on it.",
|
|
33516
33629
|
"fieldName": "hole"
|
|
33517
33630
|
},
|
|
33518
33631
|
{
|
|
@@ -33564,7 +33677,7 @@
|
|
|
33564
33677
|
"helix": {
|
|
33565
33678
|
"category": "charts",
|
|
33566
33679
|
"since": "0.1.0",
|
|
33567
|
-
"status": "
|
|
33680
|
+
"status": "stable",
|
|
33568
33681
|
"documentation": "https://fusion.dev/helix/components/donut-chart",
|
|
33569
33682
|
"aliases": [
|
|
33570
33683
|
"Pie Chart",
|
|
@@ -43212,6 +43325,44 @@
|
|
|
43212
43325
|
"module": "src/mixins/mixin-chart-source/mixin-chart-source.ts"
|
|
43213
43326
|
}
|
|
43214
43327
|
},
|
|
43328
|
+
{
|
|
43329
|
+
"kind": "field",
|
|
43330
|
+
"name": "plottedColumns",
|
|
43331
|
+
"type": {
|
|
43332
|
+
"text": "number[]"
|
|
43333
|
+
},
|
|
43334
|
+
"description": "Which cells of a row hold numbers, by their place in it, in table order.\n\nThe same test `readSeries` applies when it drops a column of notes: a\ncolumn is a series where any row parses, so a series survives one blank\ncell and a column of words is never one.",
|
|
43335
|
+
"readonly": true,
|
|
43336
|
+
"inheritedFrom": {
|
|
43337
|
+
"name": "MixinChartSource",
|
|
43338
|
+
"module": "src/mixins/mixin-chart-source/mixin-chart-source.ts"
|
|
43339
|
+
}
|
|
43340
|
+
},
|
|
43341
|
+
{
|
|
43342
|
+
"kind": "method",
|
|
43343
|
+
"name": "seriesOf",
|
|
43344
|
+
"return": {
|
|
43345
|
+
"type": {
|
|
43346
|
+
"text": "number | undefined"
|
|
43347
|
+
}
|
|
43348
|
+
},
|
|
43349
|
+
"parameters": [
|
|
43350
|
+
{
|
|
43351
|
+
"name": "cell",
|
|
43352
|
+
"type": {
|
|
43353
|
+
"text": "number"
|
|
43354
|
+
}
|
|
43355
|
+
}
|
|
43356
|
+
],
|
|
43357
|
+
"description": "The palette slot the cell at this place in a row is drawn in.\n\n**A cell's place in its row is not its series' depth, and the tooltip\nspent a while assuming it was.** `readSeries` drops a column nothing\nparses and `readRows` keeps it, so one column of notes among the figures\nmoves every column after it one color along in the bubble: a row reading\n`Referral 1,080` wearing series three's green beside a legend that says\nseries three is something else, which is the one failure the dot exists\nto prevent.\n\nOverridden where a chart reads the table some other way. `ScatterChart`\nsplits the first plotted column off as the measure across, so its first\n*plotted* series is this table's second numeric column.",
|
|
43358
|
+
"inheritedFrom": {
|
|
43359
|
+
"name": "MixinChartSource",
|
|
43360
|
+
"module": "src/mixins/mixin-chart-source/mixin-chart-source.ts"
|
|
43361
|
+
},
|
|
43362
|
+
"type": {
|
|
43363
|
+
"text": "seriesOf(cell: number) => number | undefined"
|
|
43364
|
+
}
|
|
43365
|
+
},
|
|
43215
43366
|
{
|
|
43216
43367
|
"kind": "field",
|
|
43217
43368
|
"name": "readings",
|
|
@@ -48838,7 +48989,7 @@
|
|
|
48838
48989
|
"declarations": [
|
|
48839
48990
|
{
|
|
48840
48991
|
"kind": "class",
|
|
48841
|
-
"description": "A legend is a list, so it is a list: not part of a chart, and shared by\nwhichever of them needs one. It takes its entries from the same table the\nchart reads, through `for`, so the two cannot disagree.\n\n`entries` picks which way to read that table. `series` is one entry per data\ncolumn, named by the header row, which is a line or a bar chart.\n`categories` is one entry per body row, which is a donut: its slices are the\nrows and it has no axis to write their names along.\n\n**The table is resolved on the client and there is no server pass.**",
|
|
48992
|
+
"description": "A legend is a list, so it is a list: not part of a chart, and shared by\nwhichever of them needs one. It takes its entries from the same table the\nchart reads, through `for`, so the two cannot disagree.\n\n`entries` picks which way to read that table. `series` is one entry per data\ncolumn, named by the header row, which is a line or a bar chart.\n`categories` is one entry per body row, which is a donut: its slices are the\nrows and it has no axis to write their names along. `measures` drops the\nfirst data column, which is a scatter.\n\n**The table is resolved on the client and there is no server pass.**",
|
|
48842
48993
|
"name": "HelixHeadlessLegend",
|
|
48843
48994
|
"cssParts": [
|
|
48844
48995
|
{
|
|
@@ -48863,9 +49014,9 @@
|
|
|
48863
49014
|
"kind": "field",
|
|
48864
49015
|
"name": "entries",
|
|
48865
49016
|
"type": {
|
|
48866
|
-
"text": "'categories' | 'series' | undefined"
|
|
49017
|
+
"text": "'categories' | 'measures' | 'series' | undefined"
|
|
48867
49018
|
},
|
|
48868
|
-
"description": "Which way to read the table.\n\nAbsent is `series`, one entry per data column. `categories` reads one entry\nper body row instead, for a donut, whose slices are the rows.",
|
|
49019
|
+
"description": "Which way to read the table.\n\nAbsent is `series`, one entry per data column. `categories` reads one entry\nper body row instead, for a donut, whose slices are the rows.\n\n**`measures` is `series` without the first column, and it is for a\nscatter.** That chart reads its first numeric column as the measure\n*across*, so its first plotted series is the table's second and everything\na legend beside it named was one color out: the across column wearing the\ncolor of the first series drawn, and each real series wearing the next\none's. The across gets no entry rather than a shifted one, because it is an\naxis and a scatter already writes its name at the end of the scale under\nthe plot.\n\nA legend cannot ask the chart which of these it is, `for` naming the table\nthey share and not each other, so the consumer says it. That is the same\nshape `categories` already has.",
|
|
48869
49020
|
"attribute": "entries",
|
|
48870
49021
|
"reflects": true
|
|
48871
49022
|
},
|
|
@@ -49226,9 +49377,9 @@
|
|
|
49226
49377
|
{
|
|
49227
49378
|
"name": "entries",
|
|
49228
49379
|
"type": {
|
|
49229
|
-
"text": "'categories' | 'series' | undefined"
|
|
49380
|
+
"text": "'categories' | 'measures' | 'series' | undefined"
|
|
49230
49381
|
},
|
|
49231
|
-
"description": "Which way to read the table.\n\nAbsent is `series`, one entry per data column. `categories` reads one entry\nper body row instead, for a donut, whose slices are the rows.",
|
|
49382
|
+
"description": "Which way to read the table.\n\nAbsent is `series`, one entry per data column. `categories` reads one entry\nper body row instead, for a donut, whose slices are the rows.\n\n**`measures` is `series` without the first column, and it is for a\nscatter.** That chart reads its first numeric column as the measure\n*across*, so its first plotted series is the table's second and everything\na legend beside it named was one color out: the across column wearing the\ncolor of the first series drawn, and each real series wearing the next\none's. The across gets no entry rather than a shifted one, because it is an\naxis and a scatter already writes its name at the end of the scale under\nthe plot.\n\nA legend cannot ask the chart which of these it is, `for` naming the table\nthey share and not each other, so the consumer says it. That is the same\nshape `categories` already has.",
|
|
49232
49383
|
"fieldName": "entries"
|
|
49233
49384
|
},
|
|
49234
49385
|
{
|
|
@@ -49325,6 +49476,16 @@
|
|
|
49325
49476
|
"kind": "class",
|
|
49326
49477
|
"description": "The chart for a shape rather than for a quantity, which is what decides the\none thing a bar chart is not allowed to do.\n\n**It measures from its own range and not from zero, deliberately.** `BarChart`\nrefuses that switch because a bar's length *is* its value, so a baseline\nanywhere else makes the lengths proportional to nothing. A line claims no\nsuch thing: it says where the readings went, and forcing zero into the range\nof a series that moves between 980 and 1020 flattens the entire shape into a\nrule across the top of the box. The two rules are opposite because the two\ncharts answer opposite questions, and `zero` is here for the case where the\ndistance from nothing is the point.\n\n**One scale across every series**, the same as the bar chart, because two\nseries drawn to different scales are two charts sharing a picture.\n\n**Not the chart for a total made of parts.** `area` washes each series from\nthe floor on its own, so they overlap; `Area Chart` stacks them, so the top\nedge is the total and each band is a share. A line chart answers how each\nseries moved, an area chart how the whole is made up.\n\n**The labels are HTML beside the drawing rather than `<text>` inside it**, for\nthe reason `BarChart` records: an `<svg>` that fills its box scales its type\nwith everything else, the same `font-size` arriving at 10px in a narrow chart\nand 43px in a wide one, and there is no non-scaling-font to answer it the way\n`vector-effect` answers strokes.\n\nThe table is the accessible representation and this drawing is `aria-hidden`.\nA reader who wants the numbers gets the numbers, not a described picture.",
|
|
49327
49478
|
"name": "HelixHeadlessLineChart",
|
|
49479
|
+
"cssProperties": [
|
|
49480
|
+
{
|
|
49481
|
+
"description": "Where a series' last reading sits horizontally, as a percentage. Written by the component.",
|
|
49482
|
+
"name": "--chart-terminus-x"
|
|
49483
|
+
},
|
|
49484
|
+
{
|
|
49485
|
+
"description": "Where a series' last reading sits vertically, as a percentage. Written by the component.",
|
|
49486
|
+
"name": "--chart-terminus-y"
|
|
49487
|
+
}
|
|
49488
|
+
],
|
|
49328
49489
|
"cssParts": [
|
|
49329
49490
|
{
|
|
49330
49491
|
"description": "The wash under one line, where `area` is set.",
|
|
@@ -49492,7 +49653,7 @@
|
|
|
49492
49653
|
"type": {
|
|
49493
49654
|
"text": "'none' | 'ring' | 'square' | 'triangle' | undefined"
|
|
49494
49655
|
},
|
|
49495
|
-
"description": "The shape of the mark on each series' last reading.\n\nAbsent is a dot, and absent rather than defaulted because a reflecting\nproperty with a default writes its attribute onto a host the consumer\nrendered, which React reports as a hydration mismatch.\n\n**One per series, in a column at the far edge**, because every series here\nshares an x-axis and therefore ends at the same reading. That column is the\nuseful thing: it is where a reader looks for \"and what is it now\", which is\nthe question a sparkline's single mark answers too.\n\n`none` lets the lines stop on their own, which suits a chart read for its\nshape rather than for where it finished.
|
|
49656
|
+
"description": "The shape of the mark on each series' last reading.\n\nAbsent is a dot, and absent rather than defaulted because a reflecting\nproperty with a default writes its attribute onto a host the consumer\nrendered, which React reports as a hydration mismatch.\n\n**One per series, in a column at the far edge**, because every series here\nshares an x-axis and therefore ends at the same reading. That column is the\nuseful thing: it is where a reader looks for \"and what is it now\", which is\nthe question a sparkline's single mark answers too.\n\n`none` lets the lines stop on their own, which suits a chart read for its\nshape rather than for where it finished. `square` is the same mark with its\ncorners, for a drawing whose neighbors are square, the columns of a table\nbeside it for instance. `ring` lets the ground through, for a chart drawn\nover something busy. `triangle` points along the axis and reads as \"and\nonward\" rather than as a second claim about the data.\n\nThe shapes come from\n`helix/styled/src/shared/chart/terminus.css`, the same sheet `Sparkline` takes, so\nthe set is identical wherever one appears. **Which is why every value is\nnamed here.** `Sparkline` shipped `square` implemented, drawn, asserted and\nundocumented until the cohort before this one; this family reads the same\nfour out of the same sheet and had left two of them unwritten, so the\nfinding arrived twice. A shared vocabulary wants naming at each door into\nit, because a reader arrives at one door and not at the set.\n\n`ring` is the one that asks something of the drawing. It leaves a hole and a\nline ends at the reading, which is the hole's center, so the `<svg>` is\nmasked with one disc per series and every stroke stops at its own ring's\ninner edge. `mask-composite: intersect` is what makes N holes out of N\nlayers; a single `mask-image` would only ever cut the last one.",
|
|
49496
49657
|
"attribute": "terminus",
|
|
49497
49658
|
"reflects": true
|
|
49498
49659
|
},
|
|
@@ -49845,6 +50006,44 @@
|
|
|
49845
50006
|
"module": "src/mixins/mixin-chart-source/mixin-chart-source.ts"
|
|
49846
50007
|
}
|
|
49847
50008
|
},
|
|
50009
|
+
{
|
|
50010
|
+
"kind": "field",
|
|
50011
|
+
"name": "plottedColumns",
|
|
50012
|
+
"type": {
|
|
50013
|
+
"text": "number[]"
|
|
50014
|
+
},
|
|
50015
|
+
"description": "Which cells of a row hold numbers, by their place in it, in table order.\n\nThe same test `readSeries` applies when it drops a column of notes: a\ncolumn is a series where any row parses, so a series survives one blank\ncell and a column of words is never one.",
|
|
50016
|
+
"readonly": true,
|
|
50017
|
+
"inheritedFrom": {
|
|
50018
|
+
"name": "MixinChartSource",
|
|
50019
|
+
"module": "src/mixins/mixin-chart-source/mixin-chart-source.ts"
|
|
50020
|
+
}
|
|
50021
|
+
},
|
|
50022
|
+
{
|
|
50023
|
+
"kind": "method",
|
|
50024
|
+
"name": "seriesOf",
|
|
50025
|
+
"return": {
|
|
50026
|
+
"type": {
|
|
50027
|
+
"text": "number | undefined"
|
|
50028
|
+
}
|
|
50029
|
+
},
|
|
50030
|
+
"parameters": [
|
|
50031
|
+
{
|
|
50032
|
+
"name": "cell",
|
|
50033
|
+
"type": {
|
|
50034
|
+
"text": "number"
|
|
50035
|
+
}
|
|
50036
|
+
}
|
|
50037
|
+
],
|
|
50038
|
+
"description": "The palette slot the cell at this place in a row is drawn in.\n\n**A cell's place in its row is not its series' depth, and the tooltip\nspent a while assuming it was.** `readSeries` drops a column nothing\nparses and `readRows` keeps it, so one column of notes among the figures\nmoves every column after it one color along in the bubble: a row reading\n`Referral 1,080` wearing series three's green beside a legend that says\nseries three is something else, which is the one failure the dot exists\nto prevent.\n\nOverridden where a chart reads the table some other way. `ScatterChart`\nsplits the first plotted column off as the measure across, so its first\n*plotted* series is this table's second numeric column.",
|
|
50039
|
+
"inheritedFrom": {
|
|
50040
|
+
"name": "MixinChartSource",
|
|
50041
|
+
"module": "src/mixins/mixin-chart-source/mixin-chart-source.ts"
|
|
50042
|
+
},
|
|
50043
|
+
"type": {
|
|
50044
|
+
"text": "seriesOf(cell: number) => number | undefined"
|
|
50045
|
+
}
|
|
50046
|
+
},
|
|
49848
50047
|
{
|
|
49849
50048
|
"kind": "field",
|
|
49850
50049
|
"name": "readings",
|
|
@@ -50214,7 +50413,7 @@
|
|
|
50214
50413
|
"type": {
|
|
50215
50414
|
"text": "'none' | 'ring' | 'square' | 'triangle' | undefined"
|
|
50216
50415
|
},
|
|
50217
|
-
"description": "The shape of the mark on each series' last reading.\n\nAbsent is a dot, and absent rather than defaulted because a reflecting\nproperty with a default writes its attribute onto a host the consumer\nrendered, which React reports as a hydration mismatch.\n\n**One per series, in a column at the far edge**, because every series here\nshares an x-axis and therefore ends at the same reading. That column is the\nuseful thing: it is where a reader looks for \"and what is it now\", which is\nthe question a sparkline's single mark answers too.\n\n`none` lets the lines stop on their own, which suits a chart read for its\nshape rather than for where it finished.
|
|
50416
|
+
"description": "The shape of the mark on each series' last reading.\n\nAbsent is a dot, and absent rather than defaulted because a reflecting\nproperty with a default writes its attribute onto a host the consumer\nrendered, which React reports as a hydration mismatch.\n\n**One per series, in a column at the far edge**, because every series here\nshares an x-axis and therefore ends at the same reading. That column is the\nuseful thing: it is where a reader looks for \"and what is it now\", which is\nthe question a sparkline's single mark answers too.\n\n`none` lets the lines stop on their own, which suits a chart read for its\nshape rather than for where it finished. `square` is the same mark with its\ncorners, for a drawing whose neighbors are square, the columns of a table\nbeside it for instance. `ring` lets the ground through, for a chart drawn\nover something busy. `triangle` points along the axis and reads as \"and\nonward\" rather than as a second claim about the data.\n\nThe shapes come from\n`helix/styled/src/shared/chart/terminus.css`, the same sheet `Sparkline` takes, so\nthe set is identical wherever one appears. **Which is why every value is\nnamed here.** `Sparkline` shipped `square` implemented, drawn, asserted and\nundocumented until the cohort before this one; this family reads the same\nfour out of the same sheet and had left two of them unwritten, so the\nfinding arrived twice. A shared vocabulary wants naming at each door into\nit, because a reader arrives at one door and not at the set.\n\n`ring` is the one that asks something of the drawing. It leaves a hole and a\nline ends at the reading, which is the hole's center, so the `<svg>` is\nmasked with one disc per series and every stroke stops at its own ring's\ninner edge. `mask-composite: intersect` is what makes N holes out of N\nlayers; a single `mask-image` would only ever cut the last one.",
|
|
50218
50417
|
"fieldName": "terminus"
|
|
50219
50418
|
},
|
|
50220
50419
|
{
|
|
@@ -50267,7 +50466,7 @@
|
|
|
50267
50466
|
"helix": {
|
|
50268
50467
|
"category": "charts",
|
|
50269
50468
|
"since": "0.1.0",
|
|
50270
|
-
"status": "
|
|
50469
|
+
"status": "stable",
|
|
50271
50470
|
"documentation": "https://fusion.dev/helix/components/line-chart",
|
|
50272
50471
|
"aliases": [
|
|
50273
50472
|
"Time Series",
|
|
@@ -73434,6 +73633,31 @@
|
|
|
73434
73633
|
"default": "undefined",
|
|
73435
73634
|
"description": "The point a pointer is resting nearest, which the tooltip sits on."
|
|
73436
73635
|
},
|
|
73636
|
+
{
|
|
73637
|
+
"kind": "method",
|
|
73638
|
+
"name": "seriesOf",
|
|
73639
|
+
"return": {
|
|
73640
|
+
"type": {
|
|
73641
|
+
"text": "number | undefined"
|
|
73642
|
+
}
|
|
73643
|
+
},
|
|
73644
|
+
"parameters": [
|
|
73645
|
+
{
|
|
73646
|
+
"name": "cell",
|
|
73647
|
+
"type": {
|
|
73648
|
+
"text": "number"
|
|
73649
|
+
}
|
|
73650
|
+
}
|
|
73651
|
+
],
|
|
73652
|
+
"description": "The palette slot a cell of a row is drawn in, which here is shifted by one.\n\n**A scatter's first plotted series is the table's *second* numeric\ncolumn**, the first having been split off as the measure across. So the\nmixin's answer, which is right for a chart whose columns are its series in\norder, is one too high on every column here and names a color for the\nacross, which is drawn in none. Left at that, the bubble painted the across\ncolumn in series one, the color the points themselves are drawn in, and\ngave the series actually plotted series two.\n\nThe across gets no dot at all rather than a shifted one. It is an axis and\nnot a series: it has a scale under the plot with its name at the end of it,\nwhich is where a reader is told what it is.",
|
|
73653
|
+
"inheritedFrom": {
|
|
73654
|
+
"name": "MixinChartSource",
|
|
73655
|
+
"module": "src/mixins/mixin-chart-source/mixin-chart-source.ts"
|
|
73656
|
+
},
|
|
73657
|
+
"type": {
|
|
73658
|
+
"text": "seriesOf(cell: number) => number | undefined"
|
|
73659
|
+
}
|
|
73660
|
+
},
|
|
73437
73661
|
{
|
|
73438
73662
|
"kind": "field",
|
|
73439
73663
|
"name": "rulesX",
|
|
@@ -73628,6 +73852,19 @@
|
|
|
73628
73852
|
"module": "src/mixins/mixin-chart-source/mixin-chart-source.ts"
|
|
73629
73853
|
}
|
|
73630
73854
|
},
|
|
73855
|
+
{
|
|
73856
|
+
"kind": "field",
|
|
73857
|
+
"name": "plottedColumns",
|
|
73858
|
+
"type": {
|
|
73859
|
+
"text": "number[]"
|
|
73860
|
+
},
|
|
73861
|
+
"description": "Which cells of a row hold numbers, by their place in it, in table order.\n\nThe same test `readSeries` applies when it drops a column of notes: a\ncolumn is a series where any row parses, so a series survives one blank\ncell and a column of words is never one.",
|
|
73862
|
+
"readonly": true,
|
|
73863
|
+
"inheritedFrom": {
|
|
73864
|
+
"name": "MixinChartSource",
|
|
73865
|
+
"module": "src/mixins/mixin-chart-source/mixin-chart-source.ts"
|
|
73866
|
+
}
|
|
73867
|
+
},
|
|
73631
73868
|
{
|
|
73632
73869
|
"kind": "field",
|
|
73633
73870
|
"name": "readings",
|
|
@@ -74034,7 +74271,7 @@
|
|
|
74034
74271
|
"helix": {
|
|
74035
74272
|
"category": "charts",
|
|
74036
74273
|
"since": "0.1.0",
|
|
74037
|
-
"status": "
|
|
74274
|
+
"status": "stable",
|
|
74038
74275
|
"documentation": "https://fusion.dev/helix/components/scatter-chart",
|
|
74039
74276
|
"aliases": [
|
|
74040
74277
|
"Scatter Plot",
|
|
@@ -34,12 +34,28 @@ declare const HelixHeadlessAreaChart_base: typeof HelixElement & (new (...args:
|
|
|
34
34
|
* else draws every part in proportion to nothing. `LineChart` measures from its
|
|
35
35
|
* own range because a line claims a position; a band claims an amount.
|
|
36
36
|
*
|
|
37
|
+
* **And so it is not a streamgraph**, which is the near neighbor to name.
|
|
38
|
+
* A streamgraph moves its baseline to center the bands and reads as a river; it
|
|
39
|
+
* is a real form and it is the one thing the rule above refuses, so this
|
|
40
|
+
* carries no alias for it. What it has instead is `share`, which answers the
|
|
41
|
+
* question a streamgraph is usually reached for, how the composition changed,
|
|
42
|
+
* without giving up a floor a reader can measure against.
|
|
43
|
+
*
|
|
37
44
|
* **Straight between readings unless asked otherwise.** A band's top edge is a
|
|
38
45
|
* sum, and a curve fitted through one sum can pass under the curve fitted
|
|
39
46
|
* through the sum beneath it, so a smoothed stack can draw a part as less than
|
|
40
47
|
* nothing between two readings. Straight segments between ordered points stay
|
|
41
48
|
* ordered. `curve="smooth"` is there for a stack that is read as a shape.
|
|
42
49
|
*
|
|
50
|
+
* `curve="step"` falls on the safe side of that argument rather than being
|
|
51
|
+
* unanswered by it, and it is worth saying which side because a reader cannot
|
|
52
|
+
* tell from the argument alone. A step takes no value the readings do not have:
|
|
53
|
+
* it holds one, jumps at the midpoint, and holds the next. So two stepped edges
|
|
54
|
+
* that are ordered at every reading are ordered everywhere between them, which
|
|
55
|
+
* is what `straight` is chosen for. It is the curve for a quantity that changes
|
|
56
|
+
* at a moment rather than across an interval, a headcount or a price, where a
|
|
57
|
+
* sloped edge claims a gradual change nothing measured.
|
|
58
|
+
*
|
|
43
59
|
* **`share` draws each reading as a hundred percent**, so the bands are the
|
|
44
60
|
* parts' shares and the top edge is flat. It answers "which part grew" where
|
|
45
61
|
* the default answers "did the whole grow".
|
|
@@ -56,9 +72,9 @@ declare const HelixHeadlessAreaChart_base: typeof HelixElement & (new (...args:
|
|
|
56
72
|
* nothing, and a band that folded under its neighbor would say it was.
|
|
57
73
|
*
|
|
58
74
|
* @since 0.1.0
|
|
59
|
-
* @status
|
|
75
|
+
* @status stable
|
|
60
76
|
* @category charts
|
|
61
|
-
* @aliases Stacked Area Chart, Composition Chart,
|
|
77
|
+
* @aliases Stacked Area Chart, Composition Chart, Banded Chart
|
|
62
78
|
* @documentation https://fusion.dev/helix/components/area-chart
|
|
63
79
|
*
|
|
64
80
|
* @csspart area - One part's band.
|
|
@@ -92,9 +108,13 @@ export declare class HelixHeadlessAreaChart extends HelixHeadlessAreaChart_base
|
|
|
92
108
|
/**
|
|
93
109
|
* How a band's edge gets from one reading to the next.
|
|
94
110
|
*
|
|
95
|
-
*
|
|
96
|
-
*
|
|
97
|
-
*
|
|
111
|
+
* Three values, and the class doc argues for each: `straight` is absent and
|
|
112
|
+
* is the default, `smooth` is for a stack read as a shape and is the one that
|
|
113
|
+
* can draw a part as less than nothing, `step` is for a quantity that changes
|
|
114
|
+
* at a moment and is ordered the way `straight` is.
|
|
115
|
+
*
|
|
116
|
+
* Absent rather than defaulted because a reflecting property with a default
|
|
117
|
+
* writes its attribute onto every host, including the ones nobody configured.
|
|
98
118
|
*/
|
|
99
119
|
curve?: Curve;
|
|
100
120
|
/**
|
|
@@ -26,8 +26,7 @@ let HelixHeadlessAreaChart = class HelixHeadlessAreaChart extends MixinChartSour
|
|
|
26
26
|
}
|
|
27
27
|
get stack() {
|
|
28
28
|
const rows = this.sourceRows;
|
|
29
|
-
const
|
|
30
|
-
const columns = Array.from({ length: width }, (_, column) => column).filter((column) => rows.some((row) => row.cells[column]?.value !== undefined));
|
|
29
|
+
const columns = this.plottedColumns;
|
|
31
30
|
const values = columns.map((column) => rows.map((row) => {
|
|
32
31
|
const value = row.cells[column]?.value ?? 0;
|
|
33
32
|
if (value < 0) {
|
|
@@ -185,7 +184,7 @@ let HelixHeadlessAreaChart = class HelixHeadlessAreaChart extends MixinChartSour
|
|
|
185
184
|
placement: 'top',
|
|
186
185
|
x: `${at * slot + slot / 2}%`,
|
|
187
186
|
y: `${y(stack.layers.at(-1)?.[at] ?? 0)}%`,
|
|
188
|
-
});
|
|
187
|
+
}, (cell) => this.seriesOf(cell));
|
|
189
188
|
}
|
|
190
189
|
};
|
|
191
190
|
__decorate([
|