@cdc/chart 4.25.11 → 4.26.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 (181) hide show
  1. package/CLAUDE.local.md +79 -0
  2. package/dist/{cdcchart-dgT_1dIT.es.js → cdcchart-DQ00cQCm.es.js} +1 -20
  3. package/dist/cdcchart.js +51401 -50814
  4. package/examples/default.json +378 -0
  5. package/examples/feature/__data__/horizon-chart-data.json +373 -0
  6. package/examples/feature/annotations/index.json +3 -6
  7. package/examples/feature/horizon/horizon-chart.json +395 -0
  8. package/examples/feature/pie/planet-pie-example-config.json +48 -2
  9. package/examples/line-chart-states.json +1085 -0
  10. package/examples/private/123.json +694 -0
  11. package/examples/private/DEV-12100.json +1303 -0
  12. package/examples/private/anchor-issue.json +4094 -0
  13. package/examples/private/backwards-slider.json +10430 -0
  14. package/examples/private/cat-y.json +1235 -0
  15. package/examples/private/data-points.json +228 -0
  16. package/examples/private/georgia.csv +160 -0
  17. package/examples/private/height.json +3915 -0
  18. package/examples/private/links.json +569 -0
  19. package/examples/private/quadrant.txt +30 -0
  20. package/examples/private/test-forecast.json +5510 -0
  21. package/examples/private/timeline-data.json +1 -0
  22. package/examples/private/timeline.json +389 -0
  23. package/examples/private/warming-stripe-test.json +2578 -0
  24. package/examples/private/warming-stripes.json +4763 -0
  25. package/examples/radar-chart-simple.json +133 -0
  26. package/examples/radar-chart.json +148 -0
  27. package/examples/tech-adoption-with-links.json +560 -0
  28. package/index.html +1 -36
  29. package/package.json +59 -60
  30. package/src/CdcChartComponent.tsx +206 -89
  31. package/src/_stories/Chart.Anchors.stories.tsx +10 -0
  32. package/src/_stories/Chart.BoxPlot.stories.tsx +7 -0
  33. package/src/_stories/Chart.CI.stories.tsx +13 -0
  34. package/src/_stories/Chart.Combo.stories.tsx +17 -0
  35. package/src/_stories/Chart.CustomColors.stories.tsx +4 -0
  36. package/src/_stories/Chart.DynamicSeries.stories.tsx +19 -0
  37. package/src/_stories/Chart.Filters.stories.tsx +4 -0
  38. package/src/_stories/Chart.Forecast.stories.tsx +4 -0
  39. package/src/_stories/Chart.HTMLInDataTable.stories.tsx +22 -0
  40. package/src/_stories/Chart.Legend.Gradient.stories.tsx +28 -0
  41. package/src/_stories/Chart.Patterns.stories.tsx +4 -0
  42. package/src/_stories/Chart.PreserveDecimals.stories.tsx +25 -0
  43. package/src/_stories/Chart.Regions.Categorical.stories.tsx +161 -0
  44. package/src/_stories/Chart.Regions.DateScale.stories.tsx +216 -0
  45. package/src/_stories/Chart.Regions.DateTimeScale.stories.tsx +312 -0
  46. package/src/_stories/Chart.ScatterPlot.stories.tsx +4 -0
  47. package/src/_stories/Chart.SmallMultiples.stories.tsx +16 -0
  48. package/src/_stories/Chart.stories.tsx +45 -0
  49. package/src/_stories/Chart.tooltip.stories.tsx +7 -0
  50. package/src/_stories/ChartAnnotation.stories.tsx +10 -0
  51. package/src/_stories/ChartAxisLabels.stories.tsx +4 -0
  52. package/src/_stories/ChartAxisTitles.stories.tsx +10 -0
  53. package/src/_stories/ChartBar.Editor.stories.tsx +11 -6
  54. package/src/_stories/ChartBrush.Editor.stories.tsx +295 -0
  55. package/src/_stories/ChartBrush.Matrix.Continuous.stories.tsx +41 -0
  56. package/src/_stories/ChartBrush.Matrix.Date.stories.tsx +114 -0
  57. package/src/_stories/ChartBrush.Matrix.DateTime.stories.tsx +78 -0
  58. package/src/_stories/ChartBrush.stories.tsx +57 -0
  59. package/src/_stories/ChartEditor.Editor.stories.tsx +3 -5
  60. package/src/_stories/ChartEditor.stories.tsx +7 -0
  61. package/src/_stories/ChartLine.QuadrantAngles.stories.tsx +89 -0
  62. package/src/_stories/ChartLine.Suppression.stories.tsx +7 -0
  63. package/src/_stories/ChartLine.Symbols.stories.tsx +4 -0
  64. package/src/_stories/ChartPrefixSuffix.stories.tsx +46 -1
  65. package/src/_stories/TechAdoptionWithLinks.stories.tsx +34 -0
  66. package/src/_stories/_mock/brush_continuous.json +86 -0
  67. package/src/_stories/_mock/brush_date_large.json +176 -0
  68. package/src/_stories/_mock/brush_enabled.json +326 -0
  69. package/src/_stories/_mock/brush_mock.json +2 -69
  70. package/src/_stories/_mock/horizontal-bars-dynamic-y-axis.json +413 -0
  71. package/src/_stories/_mock/line_chart_angle_near_zero_fall.json +195 -0
  72. package/src/_stories/_mock/line_chart_angle_near_zero_rise.json +195 -0
  73. package/src/_stories/_mock/line_chart_angle_q1_steep_upward.json +195 -0
  74. package/src/_stories/_mock/line_chart_angle_q2_gentle_downward.json +195 -0
  75. package/src/_stories/_mock/line_chart_angle_q3_steep_downward.json +195 -0
  76. package/src/_stories/_mock/line_chart_angle_q4_gentle_upward.json +195 -0
  77. package/src/_stories/_mock/line_chart_quadrant_angles.json +264 -0
  78. package/src/components/Annotations/components/AnnotationDraggable.styles.css +11 -17
  79. package/src/components/Annotations/components/AnnotationDraggable.tsx +240 -116
  80. package/src/components/Annotations/components/AnnotationDropdown.styles.css +1 -2
  81. package/src/components/Annotations/components/AnnotationDropdown.tsx +8 -12
  82. package/src/components/Annotations/components/AnnotationList.styles.css +4 -10
  83. package/src/components/Annotations/components/AnnotationList.tsx +5 -4
  84. package/src/components/Annotations/components/findNearestDatum.ts +75 -85
  85. package/src/components/Annotations/helpers/getVisibleAnnotations.ts +38 -0
  86. package/src/components/AreaChart/components/AreaChart.Stacked.jsx +1 -2
  87. package/src/components/Axis/BottomAxis.tsx +270 -0
  88. package/src/components/Axis/Categorical.Axis.tsx +6 -7
  89. package/src/components/Axis/LeftAxis.tsx +404 -0
  90. package/src/components/Axis/LeftAxisGridlines.tsx +77 -0
  91. package/src/components/Axis/PairedBarAxis.tsx +186 -0
  92. package/src/components/Axis/README.md +94 -0
  93. package/src/components/Axis/RightAxis.tsx +108 -0
  94. package/src/components/Axis/axis.constants.ts +21 -0
  95. package/src/components/Axis/index.ts +7 -0
  96. package/src/components/BarChart/components/BarChart.Horizontal.tsx +178 -24
  97. package/src/components/BarChart/components/BarChart.StackedHorizontal.tsx +3 -1
  98. package/src/components/BarChart/components/BarChart.StackedVertical.tsx +1 -0
  99. package/src/components/BarChart/components/BarChart.Vertical.tsx +6 -8
  100. package/src/components/BarChart/components/BarChart.tsx +7 -1
  101. package/src/components/BarChart/components/context.tsx +1 -0
  102. package/src/components/BarChart/helpers/useBarChart.ts +14 -2
  103. package/src/components/Brush/BrushSelector.tsx +1390 -0
  104. package/src/components/Brush/MiniChartPreview.tsx +400 -0
  105. package/src/components/DeviationBar.jsx +9 -7
  106. package/src/components/EditorPanel/EditorPanel.tsx +2734 -2595
  107. package/src/components/EditorPanel/components/Panels/Panel.Annotate.tsx +60 -22
  108. package/src/components/EditorPanel/components/Panels/Panel.ForestPlotSettings.tsx +56 -34
  109. package/src/components/EditorPanel/components/Panels/Panel.General.tsx +137 -30
  110. package/src/components/EditorPanel/components/Panels/Panel.PatternSettings.tsx +2 -0
  111. package/src/components/EditorPanel/components/Panels/Panel.Radar.tsx +353 -0
  112. package/src/components/EditorPanel/components/Panels/Panel.Series.tsx +0 -1
  113. package/src/components/EditorPanel/components/Panels/Panel.SmallMultiples.tsx +30 -25
  114. package/src/components/EditorPanel/components/Panels/Panel.Visual.tsx +42 -28
  115. package/src/components/EditorPanel/components/Panels/index.tsx +2 -0
  116. package/src/components/EditorPanel/useEditorPermissions.ts +81 -39
  117. package/src/components/HorizonChart/HorizonChart.tsx +131 -0
  118. package/src/components/HorizonChart/components/HorizonBand.tsx +160 -0
  119. package/src/components/HorizonChart/helpers/calculateHorizonBands.ts +27 -0
  120. package/src/components/HorizonChart/helpers/getHorizonLayerColors.ts +40 -0
  121. package/src/components/HorizonChart/index.tsx +3 -0
  122. package/src/components/Legend/Legend.Component.tsx +52 -4
  123. package/src/components/Legend/Legend.tsx +4 -3
  124. package/src/components/Legend/LegendValueRange.tsx +77 -0
  125. package/src/components/Legend/helpers/createFormatLabels.tsx +164 -2
  126. package/src/components/Legend/helpers/generateValueRanges.ts +92 -0
  127. package/src/components/Legend/helpers/index.ts +10 -6
  128. package/src/components/LineChart/helpers/README.md +292 -0
  129. package/src/components/LineChart/helpers/labelPositioning.test.ts +245 -0
  130. package/src/components/LineChart/helpers/labelPositioning.ts +304 -0
  131. package/src/components/LineChart/index.tsx +44 -8
  132. package/src/components/LinearChart/README.md +109 -0
  133. package/src/components/LinearChart/VisualizationRenderer.tsx +267 -0
  134. package/src/components/LinearChart/linearChart.constants.ts +84 -0
  135. package/src/components/LinearChart/tests/LinearChart.test.tsx +201 -0
  136. package/src/components/LinearChart/tests/mockConfigContext.ts +129 -0
  137. package/src/components/LinearChart/utils/tickFormatting.ts +146 -0
  138. package/src/components/LinearChart.tsx +338 -1082
  139. package/src/components/PairedBarChart.jsx +20 -3
  140. package/src/components/PieChart/PieChart.tsx +1 -1
  141. package/src/components/RadarChart/RadarAxis.tsx +78 -0
  142. package/src/components/RadarChart/RadarChart.tsx +298 -0
  143. package/src/components/RadarChart/RadarGrid.tsx +64 -0
  144. package/src/components/RadarChart/RadarPolygon.tsx +91 -0
  145. package/src/components/RadarChart/helpers.ts +83 -0
  146. package/src/components/RadarChart/index.tsx +3 -0
  147. package/src/components/Regions/components/Regions.tsx +365 -122
  148. package/src/components/ScatterPlot/ScatterPlot.jsx +2 -2
  149. package/src/components/SmallMultiples/SmallMultipleTile.tsx +5 -1
  150. package/src/components/WarmingStripes/WarmingStripes.tsx +230 -0
  151. package/src/components/WarmingStripes/WarmingStripesGradientLegend.css +35 -0
  152. package/src/components/WarmingStripes/WarmingStripesGradientLegend.tsx +104 -0
  153. package/src/components/WarmingStripes/index.tsx +3 -0
  154. package/src/data/initial-state.js +17 -2
  155. package/src/helpers/calculateHorizontalBarCategoryLabelWidth.ts +57 -0
  156. package/src/helpers/getExcludedData.ts +4 -0
  157. package/src/helpers/getMinMax.ts +12 -7
  158. package/src/helpers/handleChartAriaLabels.ts +19 -19
  159. package/src/helpers/handleLineType.ts +22 -18
  160. package/src/helpers/sizeHelpers.ts +0 -20
  161. package/src/helpers/smallMultiplesHelpers.ts +1 -1
  162. package/src/hooks/useChartHoverAnalytics.tsx +10 -9
  163. package/src/hooks/useProgrammaticTooltip.ts +23 -2
  164. package/src/hooks/useScales.ts +18 -1
  165. package/src/hooks/useTooltip.tsx +34 -10
  166. package/src/scss/DataTable.scss +0 -4
  167. package/src/scss/main.scss +22 -3
  168. package/src/selectors/README.md +68 -0
  169. package/src/store/chart.reducer.ts +2 -0
  170. package/src/test/CdcChart.test.jsx +1 -1
  171. package/src/types/ChartConfig.ts +21 -0
  172. package/src/types/ChartContext.ts +1 -0
  173. package/src/types/Horizon.ts +64 -0
  174. package/src/types/Label.ts +1 -0
  175. package/src/utils/analyticsTracking.ts +19 -0
  176. package/LICENSE +0 -201
  177. package/src/components/Annotations/components/helpers/index.tsx +0 -46
  178. package/src/components/Brush/BrushChart.tsx +0 -128
  179. package/src/components/Brush/BrushController.tsx +0 -71
  180. package/src/components/Brush/types.tsx +0 -8
  181. package/src/components/BrushChart.tsx +0 -223
@@ -0,0 +1,569 @@
1
+ {
2
+ "annotations": [],
3
+ "type": "chart",
4
+ "debugSvg": false,
5
+ "chartMessage": {
6
+ "noData": "No Data Available"
7
+ },
8
+ "title": "Technology Adoption Statistics",
9
+ "showTitle": true,
10
+ "showDownloadMediaButton": false,
11
+ "theme": "theme-blue",
12
+ "animate": true,
13
+ "lineDatapointStyle": "hover",
14
+ "lineDatapointColor": "Same as Line",
15
+ "barHasBorder": "true",
16
+ "isLollipopChart": false,
17
+ "lollipopShape": "circle",
18
+ "lollipopColorStyle": "two-tone",
19
+ "visualizationSubType": "regular",
20
+ "barStyle": "rounded",
21
+ "roundingStyle": "standard",
22
+ "tipRounding": "top",
23
+ "isResponsiveTicks": false,
24
+ "general": {
25
+ "annotationDropdownText": "Annotations",
26
+ "showMissingDataLabel": false,
27
+ "showSuppressedSymbol": true,
28
+ "showZeroValueData": true,
29
+ "hideNullValue": true,
30
+ "palette": {
31
+ "isReversed": false,
32
+ "version": "2.0",
33
+ "name": "divergent_green_orange"
34
+ }
35
+ },
36
+ "padding": {
37
+ "left": 5,
38
+ "right": 5
39
+ },
40
+ "preliminaryData": [],
41
+ "yAxis": {
42
+ "hideAxis": false,
43
+ "displayNumbersOnBar": true,
44
+ "hideLabel": false,
45
+ "hideTicks": false,
46
+ "size": "75",
47
+ "gridLines": false,
48
+ "enablePadding": false,
49
+ "min": "",
50
+ "max": "",
51
+ "labelColor": "#1c1d1f",
52
+ "tickLabelColor": "#1c1d1f",
53
+ "tickColor": "#1c1d1f",
54
+ "rightHideAxis": false,
55
+ "rightAxisSize": 0,
56
+ "rightLabel": "",
57
+ "rightLabelOffsetSize": 0,
58
+ "rightAxisLabelColor": "#1c1d1f",
59
+ "rightAxisTickLabelColor": "#1c1d1f",
60
+ "rightAxisTickColor": "#1c1d1f",
61
+ "numTicks": "6",
62
+ "axisPadding": 0,
63
+ "scalePadding": 10,
64
+ "tickRotation": 0,
65
+ "anchors": [],
66
+ "shoMissingDataLabel": true,
67
+ "showMissingDataLine": true,
68
+ "categories": [],
69
+ "label": "Adoption Rate (%)",
70
+ "labelPlacement": "Below Bar"
71
+ },
72
+ "boxplot": {
73
+ "plots": [],
74
+ "borders": "true",
75
+ "plotOutlierValues": false,
76
+ "plotNonOutlierValues": true,
77
+ "labels": {
78
+ "q1": "Lower Quartile",
79
+ "q2": "q2",
80
+ "q3": "Upper Quartile",
81
+ "q4": "q4",
82
+ "minimum": "Minimum",
83
+ "maximum": "Maximum",
84
+ "mean": "Mean",
85
+ "median": "Median",
86
+ "sd": "Standard Deviation",
87
+ "iqr": "Interquartile Range",
88
+ "count": "Count",
89
+ "outliers": "Outliers",
90
+ "values": "Values",
91
+ "lowerBounds": "Lower Bounds",
92
+ "upperBounds": "Upper Bounds"
93
+ }
94
+ },
95
+ "topAxis": {
96
+ "hasLine": false
97
+ },
98
+ "isLegendValue": false,
99
+ "barThickness": "0.37",
100
+ "barHeight": 25,
101
+ "barSpace": 15,
102
+ "heights": {
103
+ "vertical": 300,
104
+ "horizontal": 250
105
+ },
106
+ "xAxis": {
107
+ "sortDates": false,
108
+ "anchors": [],
109
+ "type": "categorical",
110
+ "showTargetLabel": true,
111
+ "targetLabel": "Target",
112
+ "hideAxis": false,
113
+ "hideLabel": false,
114
+ "hideTicks": false,
115
+ "size": "50",
116
+ "tickRotation": 0,
117
+ "min": "",
118
+ "max": "100",
119
+ "labelColor": "#1c1d1f",
120
+ "tickLabelColor": "#1c1d1f",
121
+ "tickColor": "#1c1d1f",
122
+ "numTicks": "",
123
+ "labelOffset": 0,
124
+ "axisPadding": 200,
125
+ "target": 0,
126
+ "maxTickRotation": "90",
127
+ "padding": 5,
128
+ "showYearsOnce": false,
129
+ "sortByRecentDate": false,
130
+ "brushActive": false,
131
+ "dataKey": "Technology",
132
+ "tickWidthMax": 43,
133
+ "label": "Technology"
134
+ },
135
+ "table": {
136
+ "label": "Data Table",
137
+ "expanded": true,
138
+ "limitHeight": false,
139
+ "height": "500",
140
+ "caption": "",
141
+ "showDownloadUrl": false,
142
+ "showDataTableLink": true,
143
+ "showDownloadLinkBelow": false,
144
+ "indexLabel": "",
145
+ "download": true,
146
+ "showVertical": true,
147
+ "dateDisplayFormat": "",
148
+ "showMissingDataLabel": true,
149
+ "showSuppressedSymbol": true,
150
+ "collapsible": true,
151
+ "show": true,
152
+ "showDownloadImgButton": false,
153
+ "groupBy": "",
154
+ "cellMinWidth": "150"
155
+ },
156
+ "orientation": "horizontal",
157
+ "columns": {
158
+ "Users (millions)": {
159
+ "label": "Users (millions)",
160
+ "dataTable": true,
161
+ "tooltips": true,
162
+ "prefix": "",
163
+ "suffix": "M",
164
+ "forestPlot": false,
165
+ "startingPoint": "0",
166
+ "forestPlotAlignRight": false,
167
+ "roundToPlace": 1,
168
+ "commas": true,
169
+ "showInViz": false,
170
+ "forestPlotStartingPoint": 0,
171
+ "name": "Users (millions)"
172
+ },
173
+ "Growth Rate": {
174
+ "label": "Growth Rate",
175
+ "dataTable": true,
176
+ "tooltips": true,
177
+ "prefix": "",
178
+ "suffix": "%",
179
+ "forestPlot": false,
180
+ "startingPoint": "0",
181
+ "forestPlotAlignRight": false,
182
+ "roundToPlace": 1,
183
+ "commas": false,
184
+ "showInViz": false,
185
+ "forestPlotStartingPoint": 0,
186
+ "name": "Growth Rate"
187
+ },
188
+ "Learn More": {
189
+ "label": "Learn More",
190
+ "dataTable": true,
191
+ "tooltips": false,
192
+ "prefix": "",
193
+ "suffix": "",
194
+ "forestPlot": false,
195
+ "startingPoint": "0",
196
+ "forestPlotAlignRight": false,
197
+ "roundToPlace": 0,
198
+ "commas": false,
199
+ "showInViz": false,
200
+ "forestPlotStartingPoint": 0,
201
+ "name": "Learn More"
202
+ }
203
+ },
204
+ "legend": {
205
+ "hide": true,
206
+ "behavior": "isolate",
207
+ "axisAlign": true,
208
+ "singleRow": true,
209
+ "colorCode": "",
210
+ "reverseLabelOrder": false,
211
+ "description": "",
212
+ "dynamicLegend": false,
213
+ "dynamicLegendDefaultText": "Show All",
214
+ "dynamicLegendItemLimit": 5,
215
+ "dynamicLegendItemLimitMessage": "Dynamic Legend Item Limit Hit.",
216
+ "dynamicLegendChartMessage": "Select Options from the Legend",
217
+ "label": "",
218
+ "lineMode": false,
219
+ "verticalSorted": false,
220
+ "highlightOnHover": false,
221
+ "hideSuppressedLabels": false,
222
+ "hideSuppressionLink": false,
223
+ "seriesHighlight": [],
224
+ "style": "circles",
225
+ "subStyle": "linear blocks",
226
+ "groupBy": "",
227
+ "shape": "circle",
228
+ "tickRotation": "",
229
+ "order": "dataColumn",
230
+ "hideBorder": {
231
+ "side": false,
232
+ "topBottom": true
233
+ },
234
+ "position": "right",
235
+ "orderedValues": [],
236
+ "patterns": {},
237
+ "patternField": "",
238
+ "unified": true
239
+ },
240
+ "smallMultiples": {
241
+ "mode": "",
242
+ "tileColumn": "",
243
+ "tilesPerRowDesktop": 3,
244
+ "tilesPerRowMobile": 1,
245
+ "tileOrder": [],
246
+ "tileOrderType": "asc",
247
+ "tileTitles": {},
248
+ "independentYAxis": false,
249
+ "colorMode": "same",
250
+ "synchronizedTooltips": true,
251
+ "showAreaUnderLine": true
252
+ },
253
+ "exclusions": {
254
+ "active": false,
255
+ "keys": []
256
+ },
257
+ "twoColor": {
258
+ "palette": "monochrome-1",
259
+ "isPaletteReversed": false
260
+ },
261
+ "labels": false,
262
+ "dataFormat": {
263
+ "commas": true,
264
+ "prefix": "",
265
+ "suffix": "%",
266
+ "abbreviated": false,
267
+ "bottomSuffix": "",
268
+ "bottomPrefix": "",
269
+ "bottomAbbreviated": false
270
+ },
271
+ "filters": [
272
+ {
273
+ "values": [
274
+ "Social Media",
275
+ "Cloud Services",
276
+ "Development Tools",
277
+ "Communication"
278
+ ],
279
+ "filterStyle": "dropdown",
280
+ "id": 1765208699247,
281
+ "showDropdown": true,
282
+ "active": "Social Media",
283
+ "columnName": "Category",
284
+ "orderedValues": [
285
+ "Social Media",
286
+ "Cloud Services",
287
+ "Development Tools",
288
+ "Communication"
289
+ ],
290
+ "label": "Select technology category",
291
+ "order": "cust"
292
+ }
293
+ ],
294
+ "confidenceKeys": {},
295
+ "visual": {
296
+ "border": true,
297
+ "accent": true,
298
+ "background": true,
299
+ "verticalHoverLine": false,
300
+ "horizontalHoverLine": false,
301
+ "lineDatapointSymbol": "none",
302
+ "maximumShapeAmount": 7
303
+ },
304
+ "useLogScale": false,
305
+ "filterBehavior": "Filter Change",
306
+ "highlightedBarValues": [],
307
+ "series": [
308
+ {
309
+ "dataKey": "Adoption Rate",
310
+ "type": "Bar",
311
+ "axis": "Left",
312
+ "tooltip": true,
313
+ "dynamicCategory": ""
314
+ }
315
+ ],
316
+ "tooltips": {
317
+ "opacity": 90,
318
+ "singleSeries": true,
319
+ "dateDisplayFormat": ""
320
+ },
321
+ "forestPlot": {
322
+ "startAt": 0,
323
+ "colors": {
324
+ "line": "",
325
+ "shape": ""
326
+ },
327
+ "lineOfNoEffect": {
328
+ "show": true
329
+ },
330
+ "type": "",
331
+ "pooledResult": {
332
+ "diamondHeight": 5,
333
+ "column": ""
334
+ },
335
+ "estimateField": "",
336
+ "estimateRadius": "",
337
+ "shape": "square",
338
+ "rowHeight": 20,
339
+ "description": {
340
+ "show": true,
341
+ "text": "description",
342
+ "location": 0
343
+ },
344
+ "result": {
345
+ "show": true,
346
+ "text": "result",
347
+ "location": 100
348
+ },
349
+ "radius": {
350
+ "min": 2,
351
+ "max": 10,
352
+ "scalingColumn": ""
353
+ },
354
+ "regression": {
355
+ "lower": 0,
356
+ "upper": 0,
357
+ "estimateField": 0
358
+ },
359
+ "leftWidthOffset": 0,
360
+ "rightWidthOffset": 0,
361
+ "showZeroLine": false,
362
+ "leftLabel": "",
363
+ "rightLabel": ""
364
+ },
365
+ "area": {
366
+ "isStacked": false
367
+ },
368
+ "sankey": {
369
+ "title": {
370
+ "defaultColor": "black"
371
+ },
372
+ "iterations": 1,
373
+ "rxValue": 0.9,
374
+ "overallSize": {
375
+ "width": 900,
376
+ "height": 700
377
+ },
378
+ "margin": {
379
+ "margin_y": 25,
380
+ "margin_x": 0
381
+ },
382
+ "nodeSize": {
383
+ "nodeWidth": 26,
384
+ "nodeHeight": 40
385
+ },
386
+ "nodePadding": 55,
387
+ "nodeFontColor": "black",
388
+ "nodeColor": {
389
+ "default": "#ff8500",
390
+ "inactive": "#808080"
391
+ },
392
+ "linkColor": {
393
+ "default": "#ffc900",
394
+ "inactive": "#D3D3D3"
395
+ },
396
+ "opacity": {
397
+ "nodeOpacityDefault": 1,
398
+ "nodeOpacityInactive": 0.1,
399
+ "LinkOpacityDefault": 1,
400
+ "LinkOpacityInactive": 0.1
401
+ },
402
+ "storyNodeFontColor": "#006778",
403
+ "storyNodeText": [],
404
+ "nodeValueStyle": {
405
+ "textBefore": "(",
406
+ "textAfter": ")"
407
+ },
408
+ "data": []
409
+ },
410
+ "markupVariables": [],
411
+ "enableMarkupVariables": false,
412
+ "errors": [],
413
+ "currentViewport": "lg",
414
+ "id": 1,
415
+ "category": "Charts",
416
+ "label": "Bar",
417
+ "subType": "Bar",
418
+ "icon": {
419
+ "key": null,
420
+ "ref": null,
421
+ "props": {},
422
+ "_owner": null
423
+ },
424
+ "content": "Use bars to show comparisons between data categories.",
425
+ "visualizationType": "Bar",
426
+ "activeVizButtonID": 1,
427
+ "dataFileName": "",
428
+ "dataFileSourceType": "data",
429
+ "dataDescription": {
430
+ "horizontal": false,
431
+ "series": false
432
+ },
433
+ "version": "4.25.11",
434
+ "migrations": {
435
+ "addColorMigration": true
436
+ },
437
+ "dynamicMarginTop": 0,
438
+ "data": [
439
+ {
440
+ "Category": "Social Media",
441
+ "Technology": "<a href=\"https://developer.twitter.com/en/docs\">Twitter/X</a>",
442
+ "Adoption Rate": "68.2",
443
+ "Users (millions)": "528.3",
444
+ "Growth Rate": "2.1",
445
+ "Learn More": "<a href=\"https://developer.twitter.com/en/docs\">View API Documentation &raquo;</a>"
446
+ },
447
+ {
448
+ "Category": "Social Media",
449
+ "Technology": "<a href=\"https://developers.facebook.com/docs/instagram\">Instagram</a>",
450
+ "Adoption Rate": "82.5",
451
+ "Users (millions)": "1478.0",
452
+ "Growth Rate": "8.7",
453
+ "Learn More": "<a href=\"https://developers.facebook.com/docs/instagram\">Learn more about Instagram API &raquo;</a>"
454
+ },
455
+ {
456
+ "Category": "Social Media",
457
+ "Technology": "<a href=\"https://developers.tiktok.com/\">TikTok</a>",
458
+ "Adoption Rate": "73.1",
459
+ "Users (millions)": "1051.0",
460
+ "Growth Rate": "15.2",
461
+ "Learn More": "<a href=\"https://developers.tiktok.com/\">Explore TikTok Developer Platform &raquo;</a>"
462
+ },
463
+ {
464
+ "Category": "Social Media",
465
+ "Technology": "<a href=\"https://developer.linkedin.com/\">LinkedIn</a>",
466
+ "Adoption Rate": "45.8",
467
+ "Users (millions)": "875.0",
468
+ "Growth Rate": "5.3",
469
+ "Learn More": "<a href=\"https://developer.linkedin.com/\">LinkedIn Developer Resources &raquo;</a>"
470
+ },
471
+ {
472
+ "Category": "Cloud Services",
473
+ "Technology": "<a href=\"https://aws.amazon.com/documentation/\">AWS</a>",
474
+ "Adoption Rate": "91.3",
475
+ "Users (millions)": "2500.0",
476
+ "Growth Rate": "12.5",
477
+ "Learn More": "<a href=\"https://aws.amazon.com/documentation/\">AWS Documentation &raquo;</a>"
478
+ },
479
+ {
480
+ "Category": "Cloud Services",
481
+ "Technology": "<a href=\"https://docs.microsoft.com/azure/\">Azure</a>",
482
+ "Adoption Rate": "78.9",
483
+ "Users (millions)": "1800.0",
484
+ "Growth Rate": "18.3",
485
+ "Learn More": "<a href=\"https://docs.microsoft.com/azure/\">Azure Documentation &raquo;</a>"
486
+ },
487
+ {
488
+ "Category": "Cloud Services",
489
+ "Technology": "<a href=\"https://cloud.google.com/docs\">Google Cloud</a>",
490
+ "Adoption Rate": "62.4",
491
+ "Users (millions)": "1200.0",
492
+ "Growth Rate": "22.1",
493
+ "Learn More": "<a href=\"https://cloud.google.com/docs\">Google Cloud Docs &raquo;</a>"
494
+ },
495
+ {
496
+ "Category": "Cloud Services",
497
+ "Technology": "<a href=\"https://docs.digitalocean.com/\">DigitalOcean</a>",
498
+ "Adoption Rate": "34.2",
499
+ "Users (millions)": "385.0",
500
+ "Growth Rate": "6.8",
501
+ "Learn More": "<a href=\"https://docs.digitalocean.com/\">DigitalOcean Documentation &raquo;</a>"
502
+ },
503
+ {
504
+ "Category": "Development Tools",
505
+ "Technology": "<a href=\"https://docs.github.com/\">GitHub</a>",
506
+ "Adoption Rate": "94.6",
507
+ "Users (millions)": "100.0",
508
+ "Growth Rate": "9.2",
509
+ "Learn More": "<a href=\"https://docs.github.com/\">GitHub Documentation &raquo;</a>"
510
+ },
511
+ {
512
+ "Category": "Development Tools",
513
+ "Technology": "<a href=\"https://code.visualstudio.com/docs\">VS Code</a>",
514
+ "Adoption Rate": "87.3",
515
+ "Users (millions)": "14.0",
516
+ "Growth Rate": "11.5",
517
+ "Learn More": "<a href=\"https://code.visualstudio.com/docs\">VS Code Documentation &raquo;</a>"
518
+ },
519
+ {
520
+ "Category": "Development Tools",
521
+ "Technology": "<a href=\"https://docs.docker.com/\">Docker</a>",
522
+ "Adoption Rate": "79.8",
523
+ "Users (millions)": "13.0",
524
+ "Growth Rate": "14.3",
525
+ "Learn More": "<a href=\"https://docs.docker.com/\">Docker Documentation &raquo;</a>"
526
+ },
527
+ {
528
+ "Category": "Development Tools",
529
+ "Technology": "<a href=\"https://docs.npmjs.com/\">npm</a>",
530
+ "Adoption Rate": "85.2",
531
+ "Users (millions)": "17.0",
532
+ "Growth Rate": "7.9",
533
+ "Learn More": "<a href=\"https://docs.npmjs.com/\">npm Documentation &raquo;</a>"
534
+ },
535
+ {
536
+ "Category": "Communication",
537
+ "Technology": "<a href=\"https://api.slack.com/\">Slack</a>",
538
+ "Adoption Rate": "71.5",
539
+ "Users (millions)": "18.0",
540
+ "Growth Rate": "10.2",
541
+ "Learn More": "<a href=\"https://api.slack.com/\">Slack API Documentation &raquo;</a>"
542
+ },
543
+ {
544
+ "Category": "Communication",
545
+ "Technology": "<a href=\"https://docs.microsoft.com/microsoftteams/\">Microsoft Teams</a>",
546
+ "Adoption Rate": "68.9",
547
+ "Users (millions)": "280.0",
548
+ "Growth Rate": "25.7",
549
+ "Learn More": "<a href=\"https://docs.microsoft.com/microsoftteams/\">Teams Documentation &raquo;</a>"
550
+ },
551
+ {
552
+ "Category": "Communication",
553
+ "Technology": "<a href=\"https://developers.zoom.us/\">Zoom</a>",
554
+ "Adoption Rate": "75.2",
555
+ "Users (millions)": "300.0",
556
+ "Growth Rate": "8.4",
557
+ "Learn More": "<a href=\"https://developers.zoom.us/\">Zoom Developer Platform &raquo;</a>"
558
+ },
559
+ {
560
+ "Category": "Communication",
561
+ "Technology": "<a href=\"https://discord.com/developers/docs/\">Discord</a>",
562
+ "Adoption Rate": "56.3",
563
+ "Users (millions)": "150.0",
564
+ "Growth Rate": "19.6",
565
+ "Learn More": "<a href=\"https://discord.com/developers/docs/\">Discord Developer Portal &raquo;</a>"
566
+ }
567
+ ],
568
+ "datasets": {}
569
+ }
@@ -0,0 +1,30 @@
1
+ Quadrant Setup
2
+
3
+ When looking at segments, think of them as being arranged in a grid with quadrants
4
+ Starting segment (left quadrants) should always be in Quadrants 2 or 3 (check work)
5
+ Ending segment (right quadrants) should always be in Quadrants 1 and 4 (check work)
6
+
7
+ First Data Point Rules:
8
+
9
+ Position label 0.5rem / 9px above point when segment is in Quadrant 3
10
+ If the point isn't near the x-axis, position label 0.5rem / 9px below point when segment is in Quadrant 1
11
+ If point is 20 pixels or less above x-axis (i.e., it's a low value and close to 0) position label 0.5rem / 9px above and 0.25rem / 4.5px to the left of point
12
+
13
+ Last Data Point Rules:
14
+ Position label 0.5rem / 9px above point when final segment is in Quadrant 4. This also works for when last data point is near x-axis (i.e. it's a low value that's close to 0)
15
+ If the point isn't near the x-axis and final segment is in Quadrant 2, position label 0.5rem / 9px below point
16
+ If the point is 20 pixels or less above x-axis (i.e., it's a low value and close to 0) then position label 0.5rem / 9px above and 0.25rem / 4.5px to the right of point
17
+
18
+ Middle Data Point Rules:
19
+ Position label 0.5rem / 9px above point when starting segment is in Quadrant 3 and ending segment is in Quadrant 4 and the angle created is 0°–180°
20
+
21
+ If the point isn't near the x-axis, position label 0.5rem / 9px below it when starting segment is in Quadrant 2 and ending segment is in Quadrant 1 and the angle created is 1°–179°
22
+ If the point is 20 pixels or less above x-axis (i.e., it's a low value and close to 0) and starting sement is in Quadrant 2 and ending segment is in Quadrant 1 then calculate the angle between the 2 segments:
23
+
24
+
25
+
26
+ If it's 135°–180° then position the label 0.5rem / 9px above the point
27
+ If it's less than135°, calculate the angle created by the ending segment, if it's 68° or more then position the label 0.5rem / 9px above and 0.5rem / 9px to the right of the point
28
+ Otherwise, position the label 0.5rem / 9px above and 0.5rem / 9px to the left of the point
29
+ Position the label 0.5rem / 9px above and 0.5rem / 9px to the left of the point if starting segment is in Quadrant 3 and ending segment is in Quadrant 1 and the angle created is 92°–269°
30
+ Position the label 0.5rem / 9px above and 0.5rem / 9px to the right of the point if starting segment is in Quadrant 2 and ending segment is in Quadrant 4 and the angle created is 92°–269°