@mstone6969/graph 0.1.0 → 0.2.0

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 (238) hide show
  1. package/README.md +111 -14
  2. package/dist/ExcelWriter-3ZSYUH4T.cjs +154 -0
  3. package/dist/GraphType.js +24 -38
  4. package/dist/PdfWriter-6HJFYMCO.cjs +205 -0
  5. package/dist/catalog-YWX6FHRM.cjs +8 -0
  6. package/dist/catalog.js +5 -1
  7. package/dist/charts/bars/index.js +2 -12
  8. package/dist/charts/comparison/EffectForestPlot.js +1 -1
  9. package/dist/charts/comparison/index.js +1 -8
  10. package/dist/charts/demography/Nomogram.js +3 -3
  11. package/dist/charts/density/HexbinChart.js +6 -4
  12. package/dist/charts/diagrams/ArchitectureCanvas.js +68 -0
  13. package/dist/charts/diagrams/ArchitectureDiagram.js +331 -0
  14. package/dist/charts/diagrams/ArchitectureLayout.js +106 -0
  15. package/dist/charts/diagrams/ArchitectureLinkLabels.js +78 -0
  16. package/dist/charts/diagrams/ArchitectureModel.js +108 -0
  17. package/dist/charts/diagrams/ArchitectureRouter.js +348 -0
  18. package/dist/charts/diagrams/ArchitectureSamples.js +312 -0
  19. package/dist/charts/diagrams/ArchitectureShapes.js +130 -0
  20. package/dist/charts/diagrams/ArchitectureText.js +25 -0
  21. package/dist/charts/diagrams/DiagramText.js +38 -0
  22. package/dist/charts/diagrams/EntityRelationshipDiagram.js +465 -0
  23. package/dist/charts/diagrams/ErCrowsFoot.js +33 -0
  24. package/dist/charts/diagrams/ErSamples.js +205 -0
  25. package/dist/charts/diagrams/ErSchema.js +122 -0
  26. package/dist/charts/diagrams/LogicCircuit.js +154 -0
  27. package/dist/charts/diagrams/LogicCircuitLayout.js +600 -0
  28. package/dist/charts/diagrams/LogicCircuitSamples.js +66 -0
  29. package/dist/charts/diagrams/LogicGateDiagram.js +216 -0
  30. package/dist/charts/diagrams/LogicGateSymbol.js +113 -0
  31. package/dist/charts/diagrams/NetworkTopologyDiagram.js +247 -0
  32. package/dist/charts/diagrams/SequenceDiagram.js +351 -0
  33. package/dist/charts/diagrams/SequenceLayout.js +422 -0
  34. package/dist/charts/diagrams/SequenceModel.js +221 -0
  35. package/dist/charts/diagrams/TopologyLayout.js +143 -0
  36. package/dist/charts/diagrams/architectureEnums.js +50 -0
  37. package/dist/charts/diagrams/index.js +26 -0
  38. package/dist/charts/diagrams/logicEnums.js +42 -0
  39. package/dist/charts/diagrams/sequenceEnums.js +40 -0
  40. package/dist/charts/distribution/HistogramChart.js +25 -3
  41. package/dist/charts/distribution/index.js +1 -3
  42. package/dist/charts/earthscience/HovmollerDiagram.js +477 -0
  43. package/dist/charts/earthscience/HovmollerEnums.js +42 -0
  44. package/dist/charts/earthscience/HovmollerField.js +180 -0
  45. package/dist/charts/earthscience/HovmollerSample.js +40 -0
  46. package/dist/charts/earthscience/HovmollerSpeed.js +71 -0
  47. package/dist/charts/earthscience/index.js +10 -2
  48. package/dist/charts/engineering/ConstellationDiagram.js +26 -6
  49. package/dist/charts/engineering/EyeDiagram.js +2 -1
  50. package/dist/charts/engineering/PoleZeroPlot.js +32 -8
  51. package/dist/charts/financial/RelativeStrengthRotation.js +434 -0
  52. package/dist/charts/financial/RelativeStrengthRotationMath.js +71 -0
  53. package/dist/charts/financial/RelativeStrengthRotationSamples.js +27 -0
  54. package/dist/charts/financial/index.js +5 -3
  55. package/dist/charts/flow/index.js +1 -5
  56. package/dist/charts/frameworks/AnsoffMatrix.js +523 -0
  57. package/dist/charts/frameworks/FrameworkText.js +98 -0
  58. package/dist/charts/frameworks/NpsGauge.js +279 -0
  59. package/dist/charts/frameworks/NpsSurvey.js +58 -0
  60. package/dist/charts/frameworks/PerceptualMap.js +419 -0
  61. package/dist/charts/frameworks/PerceptualProjection.js +142 -0
  62. package/dist/charts/frameworks/PositioningSamples.js +191 -0
  63. package/dist/charts/frameworks/RaciMatrix.js +458 -0
  64. package/dist/charts/frameworks/RaciPlan.js +81 -0
  65. package/dist/charts/frameworks/RaciSamples.js +76 -0
  66. package/dist/charts/frameworks/SwotMatrix.js +358 -0
  67. package/dist/charts/frameworks/SwotSamples.js +85 -0
  68. package/dist/charts/frameworks/VanWestendorpChart.js +187 -0
  69. package/dist/charts/frameworks/VanWestendorpSurvey.js +197 -0
  70. package/dist/charts/frameworks/index.js +26 -0
  71. package/dist/charts/frameworks/raciEnums.js +30 -0
  72. package/dist/charts/frameworks/swotEnums.js +34 -0
  73. package/dist/charts/genomics/CircosPlot.js +1 -1
  74. package/dist/charts/geoflows/GeoFlowChart.js +2 -2
  75. package/dist/charts/geoflows/GeoFlowSample.js +2 -1
  76. package/dist/charts/geomaps/FloorPlanMap.js +324 -0
  77. package/dist/charts/geomaps/FloorPlanModel.js +179 -0
  78. package/dist/charts/geomaps/FloorPlanSamples.js +416 -0
  79. package/dist/charts/geomaps/GeoLand.js +2 -2
  80. package/dist/charts/geomaps/GeoSamples.js +2 -1
  81. package/dist/charts/geomaps/GraticuleMap.js +2 -2
  82. package/dist/charts/geomaps/RoomLabelFit.js +200 -0
  83. package/dist/charts/geomaps/TissotMap.js +2 -2
  84. package/dist/charts/geomaps/index.js +8 -4
  85. package/dist/charts/hierarchy/SunburstChart.js +17 -10
  86. package/dist/charts/hierarchy/index.js +2 -11
  87. package/dist/charts/indicators/BulletChart.js +8 -2
  88. package/dist/charts/indicators/SpeedometerChart.js +1 -1
  89. package/dist/charts/indicators/ThermometerChart.js +1 -1
  90. package/dist/charts/lifescience/LoessFit.js +113 -0
  91. package/dist/charts/lifescience/MaPlot.js +337 -0
  92. package/dist/charts/lifescience/MaPlotSamples.js +35 -0
  93. package/dist/charts/lifescience/OncoGlyph.js +137 -0
  94. package/dist/charts/lifescience/OncoPrint.js +373 -0
  95. package/dist/charts/lifescience/OncoPrintMatrix.js +107 -0
  96. package/dist/charts/lifescience/OncoPrintSamples.js +142 -0
  97. package/dist/charts/lifescience/PedigreeChart.js +306 -0
  98. package/dist/charts/lifescience/PedigreeLayout.js +261 -0
  99. package/dist/charts/lifescience/PedigreeRows.js +70 -0
  100. package/dist/charts/lifescience/PedigreeSamples.js +161 -0
  101. package/dist/charts/lifescience/PedigreeSymbol.js +47 -0
  102. package/dist/charts/lifescience/RamachandranPlot.js +364 -0
  103. package/dist/charts/lifescience/RamachandranRegions.js +2712 -0
  104. package/dist/charts/lifescience/RamachandranSamples.js +235 -0
  105. package/dist/charts/lifescience/index.js +25 -0
  106. package/dist/charts/lifescience/pedigreeEnums.js +21 -0
  107. package/dist/charts/lifescience/ramachandranEnums.js +34 -0
  108. package/dist/charts/linesareas/DualAxisChart.js +1 -1
  109. package/dist/charts/linesareas/LineEnums.js +1 -15
  110. package/dist/charts/linesareas/MultiLineChart.js +1 -1
  111. package/dist/charts/linesareas/TrendChart.js +15 -5
  112. package/dist/charts/linesareas/index.js +2 -6
  113. package/dist/charts/massive/MassiveChart.js +3 -2
  114. package/dist/charts/mathematical/FourierSeriesChart.js +7 -1
  115. package/dist/charts/mathematical/index.js +2 -6
  116. package/dist/charts/matrix/GridPlot.js +27 -2
  117. package/dist/charts/matrix/TilegramChart.js +2 -2
  118. package/dist/charts/mlcharts/AttentionGrid.js +79 -0
  119. package/dist/charts/mlcharts/AttentionHeatmap.js +329 -0
  120. package/dist/charts/mlcharts/AttentionModel.js +132 -0
  121. package/dist/charts/mlcharts/AttentionSamples.js +82 -0
  122. package/dist/charts/mlcharts/CellNumber.js +8 -0
  123. package/dist/charts/mlcharts/CurveDiagnosticSamples.js +95 -0
  124. package/dist/charts/mlcharts/CurvePickMark.js +31 -0
  125. package/dist/charts/mlcharts/DecisionBoundaryChart.js +316 -0
  126. package/dist/charts/mlcharts/DecisionSamples.js +60 -0
  127. package/dist/charts/mlcharts/DecisionSurface.js +130 -0
  128. package/dist/charts/mlcharts/DistinctTicks.js +13 -0
  129. package/dist/charts/mlcharts/ElbowMath.js +153 -0
  130. package/dist/charts/mlcharts/ElbowPlot.js +273 -0
  131. package/dist/charts/mlcharts/ExplainabilitySamples.js +70 -0
  132. package/dist/charts/mlcharts/FeatureImportanceChart.js +150 -0
  133. package/dist/charts/mlcharts/ImportanceRanking.js +98 -0
  134. package/dist/charts/mlcharts/LearningCurveChart.js +276 -0
  135. package/dist/charts/mlcharts/LearningCurveMath.js +92 -0
  136. package/dist/charts/mlcharts/PartialDependence.js +92 -0
  137. package/dist/charts/mlcharts/PartialDependencePlot.js +225 -0
  138. package/dist/charts/mlcharts/WideLabel.js +28 -0
  139. package/dist/charts/mlcharts/curveDiagnosticEnums.js +37 -0
  140. package/dist/charts/mlcharts/index.js +32 -0
  141. package/dist/charts/proportion/index.js +5 -9
  142. package/dist/charts/scatter/CategoryScatterBase.js +1 -4
  143. package/dist/charts/scatter/ConnectedScatter.js +7 -4
  144. package/dist/charts/scatter/MarginalScatter.js +13 -8
  145. package/dist/charts/scatter/index.js +4 -17
  146. package/dist/charts/scientific/SpectrogramChart.js +9 -3
  147. package/dist/charts/scientific/index.js +2 -2
  148. package/dist/charts/signals/index.js +3 -13
  149. package/dist/charts/statistics/LorenzCurve.js +7 -4
  150. package/dist/charts/threebars/Candlestick3DChart.js +18 -2
  151. package/dist/charts/threeglobe/GlobeChart.js +2 -2
  152. package/dist/charts/threeglobe/GlobeSamples.js +2 -1
  153. package/dist/charts/threeglobe/RingGlobe.js +1 -1
  154. package/dist/charts/threenetwork/ConeTreeChart.js +2 -1
  155. package/dist/charts/threenetwork/Gantt3DChart.js +3 -2
  156. package/dist/charts/threesurfaces/Ridgeline3DChart.js +22 -4
  157. package/dist/charts/threevolume/LorenzAttractor.js +19 -0
  158. package/dist/charts/threevolume/VolumeRaycastChart.js +4 -3
  159. package/dist/charts/threevolume/volumeEnums.js +1 -0
  160. package/dist/charts/timeline/index.js +2 -10
  161. package/dist/chunk-753UBLV2.cjs +33 -0
  162. package/dist/chunk-VX54A7KA.cjs +17 -0
  163. package/dist/{chunk-W5GAAAZY.cjs → chunk-WAODDPYX.cjs} +24874 -17620
  164. package/dist/chunk-Z3JPIJSC.cjs +338 -0
  165. package/dist/core/CartesianChart.js +87 -11
  166. package/dist/core/Chart.js +63 -15
  167. package/dist/core/Chart2D.js +54 -17
  168. package/dist/core/Chart3D.js +56 -20
  169. package/dist/core/ChartExportError.js +2 -0
  170. package/dist/core/ChartExporter.js +50 -8
  171. package/dist/core/ColumnCheck.js +53 -0
  172. package/dist/core/Context2D.js +29 -15
  173. package/dist/core/Context3D.js +7 -2
  174. package/dist/core/ExcelWriter.js +152 -0
  175. package/dist/core/ExportText.js +28 -0
  176. package/dist/core/MarkOrigin.js +88 -0
  177. package/dist/core/MarkStyle.js +294 -0
  178. package/dist/core/Palette.js +27 -7
  179. package/dist/core/PdfPage.js +13 -0
  180. package/dist/core/PdfWriter.js +245 -0
  181. package/dist/core/Scales.js +52 -2
  182. package/dist/core/SceneOverlay.js +4 -4
  183. package/dist/core/TextFit.js +37 -0
  184. package/dist/core/Theme.js +28 -1
  185. package/dist/core/enums.js +33 -1
  186. package/dist/core/pathMorph.js +15 -0
  187. package/dist/data/SampleData.js +1 -17
  188. package/dist/data/WorldSample.js +23 -0
  189. package/dist/index.cjs +810 -691
  190. package/dist/index.d.cts +8390 -2925
  191. package/dist/index.d.ts +8392 -2927
  192. package/dist/index.js +106 -56
  193. package/dist/react/ChartView.js +18 -8
  194. package/dist/react/GraphHandle.js +2 -0
  195. package/dist/react/components.js +74 -116
  196. package/package.json +13 -3
  197. package/dist/catalog-4UP2YFNR.cjs +0 -7
  198. package/dist/charts/bars/BulletBar.js +0 -184
  199. package/dist/charts/bars/ErrorBarColumn.js +0 -147
  200. package/dist/charts/bars/HistogramBar.js +0 -217
  201. package/dist/charts/bars/MarimekkoBar.js +0 -191
  202. package/dist/charts/bars/ParetoBar.js +0 -143
  203. package/dist/charts/comparison/PanelChart.js +0 -70
  204. package/dist/charts/comparison/SmallMultipleBars.js +0 -134
  205. package/dist/charts/comparison/SpanChart.js +0 -118
  206. package/dist/charts/comparison/TrellisChart.js +0 -158
  207. package/dist/charts/distribution/RidgeSlabs3DChart.js +0 -169
  208. package/dist/charts/financial/Candlestick3D.js +0 -157
  209. package/dist/charts/flow/BumpFlow.js +0 -212
  210. package/dist/charts/flow/StreamFlow.js +0 -174
  211. package/dist/charts/geomaps/ThiessenMap.js +0 -106
  212. package/dist/charts/hierarchy/ConeTree3D.js +0 -135
  213. package/dist/charts/hierarchy/Hierarchy3DChart.js +0 -27
  214. package/dist/charts/hierarchy/SpherePack3D.js +0 -81
  215. package/dist/charts/hierarchy/SunburstTower3D.js +0 -93
  216. package/dist/charts/hierarchy/TreemapSkyline3D.js +0 -98
  217. package/dist/charts/linesareas/ConnectedScatterTime.js +0 -206
  218. package/dist/charts/linesareas/SmallMultipleLines.js +0 -153
  219. package/dist/charts/mathematical/ParametricSurface3D.js +0 -234
  220. package/dist/charts/mathematical/StrangeAttractor3D.js +0 -251
  221. package/dist/charts/proportion/ConeFunnel.js +0 -126
  222. package/dist/charts/proportion/ExtrudedPieChart.js +0 -123
  223. package/dist/charts/scatter/BeeswarmScatter.js +0 -151
  224. package/dist/charts/scatter/BinnedScatterBase.js +0 -51
  225. package/dist/charts/scatter/ContourScatter.js +0 -116
  226. package/dist/charts/scatter/GridBinScatter.js +0 -98
  227. package/dist/charts/scatter/HexbinScatter.js +0 -74
  228. package/dist/charts/scatter/StripScatter.js +0 -107
  229. package/dist/charts/scatter/SunflowerScatter.js +0 -109
  230. package/dist/charts/signals/ConstellationChart.js +0 -153
  231. package/dist/charts/signals/CorrelogramChart.js +0 -171
  232. package/dist/charts/signals/EyeDiagramChart.js +0 -155
  233. package/dist/charts/signals/PoleZeroChart.js +0 -164
  234. package/dist/charts/signals/SpectrogramChart.js +0 -79
  235. package/dist/charts/timeline/CalendarSkylineChart.js +0 -128
  236. package/dist/charts/timeline/ScheduleBlocksChart.js +0 -119
  237. package/dist/charts/timeline/SpiralTimeline.js +0 -154
  238. package/dist/charts/timeline/StreamTimeline.js +0 -141
package/README.md CHANGED
@@ -2,9 +2,9 @@
2
2
 
3
3
  A class-based chart library for React. Every chart is a TypeScript class with a matching React component: 2D charts draw to SVG with d3, and 3D charts draw to WebGL with three.js.
4
4
 
5
- [Live gallery](https://malcolmston.github.io/graph/)
5
+ [Live site](https://malcolmston.github.io/graph/)
6
6
 
7
- **642 chart classes (521 d3/SVG, 121 three.js/WebGL) expand to 42,928 chart types (35,606 2D, 7,322 3D).** A type is one class with one combination of its variant axes, for example `bar.horizontal.stacked`. Every type passes a test proving its geometry differs from its siblings, so this counts configurations, not 42,928 separately designed forms.
7
+ **628 chart classes (519 d3/SVG, 109 three.js/WebGL) expand to 42,154 variant combinations (35,114 2D, 7,040 3D).** A type is one class with one combination of its variant axes, for example `bar.horizontal.stacked`. Every type passes a test proving its geometry differs from its siblings, so this counts configurations, not 42,154 separately designed forms.
8
8
 
9
9
  The count comes from `yarn vitest run src/catalog.test.ts`, which prints it. A class such as `BarChart` is one piece of code; its declared variant axes (orientation, stacking, padding) multiply into chart types, so hand-written classes are far fewer than types.
10
10
 
@@ -14,7 +14,7 @@ The count comes from `yarn vitest run src/catalog.test.ts`, which prints it. A c
14
14
  yarn add @mstone6969/graph react react-dom
15
15
  ```
16
16
 
17
- Everything comes from one import, and bundlers keep only what you use: `Bar` adds about 550 KB before gzip, `BarChart` about 370 KB, and `GraphType` about 20 KB. `react` must be installed even if you only use the classes.
17
+ Everything comes from one import, and bundlers keep only what you use: `Bar` adds about 323 KB minified, `BarChart` about 190 KB, and `GraphType` about 20 KB, measured in a Vite app build with React external. `react` must be installed even if you only use the classes.
18
18
 
19
19
  ## Four ways to use it
20
20
 
@@ -26,7 +26,7 @@ import { Bar, Orientation, StackMode } from '@mstone6969/graph'
26
26
  <Bar data={rows} orientation={Orientation.Horizontal} stack={StackMode.Stacked} />
27
27
  ```
28
28
 
29
- A component is named after its class without `Chart`, `Plot`, `Map`, `Graph` or `Diagram`, so `BarChart` gives `Bar` and `ChoroplethMap` gives `Choropleth`. If that name is taken, by a class or a browser global, it ends in `Graph` instead: `Histogram` gives `HistogramGraph`, and each gallery page shows the name.
29
+ A component is named after its class without `Chart`, `Plot`, `Map`, `Graph` or `Diagram`, so `BarChart` gives `Bar` and `ChoroplethMap` gives `Choropleth`. If that name is taken, by a class or a browser global, it ends in `Graph` instead: `BackToBackHistogram` gives `BackToBackHistogramGraph`, and each chart page on the site shows the name.
30
30
 
31
31
  **GraphType.** For a chart chosen at runtime. `GraphType` has one member per class, and variants are props. `Graph` loads the whole catalog the first time it needs one, so prefer a component when you know the chart.
32
32
 
@@ -60,7 +60,9 @@ Option fields name your data columns, and their defaults match the sample data,
60
60
 
61
61
  `<Graph>` keeps `type`, `of`, `chart`, `className`, `style`, `id` and `role` for itself. A few classes, such as `BoxPlot`, have a variant axis called `style`: reach those through an instance. Components keep only `className`, `style`, `id` and `role`, so a chart option called `type` works on them.
62
62
 
63
- Every chart also takes the shared `ChartOptions`: `width`, `height`, `title`, `subtitle`, `theme`, `animate`, `legend`, `tooltip`, `margin`, `ariaLabel`, `onSelect` and `keyboard`. Without a fixed size it fills its parent and follows resizes.
63
+ Every chart also takes the shared `ChartOptions`: `width`, `height`, `title`, `subtitle`, `theme`, `animate`, `legend`, `tooltip`, `margin`, `ariaLabel`, `onSelect` and `keyboard`. Without a fixed size it takes its parent's width, follows resizes and is 400px tall.
64
+
65
+ Every x/y chart also takes `xTicks`, `yTicks`, `xFormat`, `yFormat`, `xDomain` and `yDomain`. The domains fix the ends of a continuous axis, `null` keeps the chart's own value for one end, and marks past them are clipped to the plot. Band axes, and charts whose marks do not follow an axis, ignore them.
64
66
 
65
67
  Every x/y chart also takes `referenceLines`, `referenceBands` and `annotations`, positioned by data value through the chart's own scales, so categories, dates and log axes all work. `axis` names the axis the value sits on, so `AnnotationAxis.Y` (the default) draws a horizontal line. Values off the domain are skipped, bands are trimmed to it, and a label with no free spot in the plot is dropped. Bands sit behind the marks, so charts that fill the whole plot hide them.
66
68
 
@@ -97,7 +99,7 @@ useEffect(() => socket.subscribe(live.append), [live.append])
97
99
  return <Graph chart={live.chart} />
98
100
  ```
99
101
 
100
- **Supported:** flat rows and long-form series rows (`{ date, series, value }`) on 2D charts with `DataShape.Table`, which is 387 catalog classes, row-fed massive charts included. Columnar massive data and anything else throws a clear error from `append` and `pause`: 3D charts, and hierarchy, graph, matrix, grid, volume, geo, function, text and genome data.
102
+ **Supported:** flat rows and long-form series rows (`{ date, series, value }`) on 2D charts with `DataShape.Table`, which is 379 catalog classes, row-fed massive charts included. Columnar massive data and anything else throws a clear error from `append` and `pause`: 3D charts, and hierarchy, graph, matrix, grid, volume, geo, function, text and genome data.
101
103
 
102
104
  **Motion:** cartesian charts whose x and y are both continuous slide. Each paint draws final geometry, then the marks, ticks and grid decay smoothly from where they last appeared, so a spike rescales instead of jumping, and marks are clipped to the plot only while they move. Charts with a band or point axis, a zoom or brush, their own `draw`, or no axes morph each mark with its usual transition instead. Massive charts draw on a canvas, so they and their axes repaint in one step. `animate: false` and reduced motion paint straight through.
103
105
 
@@ -125,18 +127,20 @@ Zooming redraws through the real scales, so ticks are recomputed and marks stay
125
127
 
126
128
  `zoom: true` follows the categories when y is the band axis, so a horizontal bar chart widens its bars instead of cutting their length. Asking for a value axis on a bar chart (`ZoomAxis.XY`) does cut bars at the plot edge, since their baseline leaves the view.
127
129
 
128
- Not supported: a chart that cannot follow a scale says so with one `console.warn`, has `chart.viewport.supported === false`, and draws as if the option were off. That covers custom axes with no inverse or a fixed domain (`DetectionErrorCurve`'s probit and log scales; the y axes of `ManhattanPlot` and of a mel `SpectrogramChart`, which still zoom along x) and charts that lay out their own marks (`MarimekkoBar`). `TileMapDensity` has no interactive zoom: its `zoom` option is the tile level, a non-number there is refused, and `brush` still works. Charts with a second value scale (`DualAxisChart`, `ParetoBar`, `ParetoChart`, `TimeDomainDiffChart`, `FilterResponseChart`) and `ECGChart`'s fixed amplitude grid zoom along their first axis only, because the rest would otherwise drift from its marks. The y axis does not rescale to fit the visible x window. Hand-picked ticks stay while at least three are in view, then the scale ticks itself; a chart's own tick text gives way to d3's when zoom makes neighbouring labels equal. Layers in the margin, such as a second axis or end labels, stay out of the clip on that side.
130
+ Not supported: a chart that cannot follow a scale says so with one `console.warn`, has `chart.viewport.supported === false`, and draws as if the option were off. That covers custom axes with no inverse or a fixed domain (`DetectionErrorCurve`'s probit and log scales; the y axes of `ManhattanPlot` and of a mel `SpectrogramChart`, which still zoom along x). `TileMapDensity` has no interactive zoom: its `zoom` option is the tile level, a non-number there is refused, and `brush` still works. Charts with a second value scale (`DualAxisChart`, `ParetoChart`, `TimeDomainDiffChart`, `FilterResponseChart`) and `ECGChart`'s fixed amplitude grid zoom along their first axis only, because the rest would otherwise drift from its marks. The y axis does not rescale to fit the visible x window. Hand-picked ticks stay while at least three are in view, then the scale ticks itself; a chart's own tick text gives way to d3's when zoom makes neighbouring labels equal. Layers in the margin, such as a second axis or end labels, stay out of the clip on that side.
129
131
 
130
132
  ## Export
131
133
 
132
- Every chart saves itself as an image or as data. `chart.exportFormats` says what is available.
134
+ Every chart saves itself as an image, a PDF, a spreadsheet or plain data. `chart.exportFormats` says what is available.
133
135
 
134
136
  ```ts
135
- import { ExportFormat } from '@mstone6969/graph'
137
+ import { ExportFormat, PdfOrientation, PdfPageSize } from '@mstone6969/graph'
136
138
 
137
139
  chart.toSVG() // string, 2D only
138
140
  chart.toPNG({ scale: 3 }) // Promise<Blob>, scale defaults to 2
139
141
  chart.toCSV() // string, from chart.table()
142
+ chart.toPDF({ pageSize: PdfPageSize.Letter, orientation: PdfOrientation.Landscape, title: 'Revenue', table: true }) // Promise<Blob>
143
+ chart.toExcel({ image: true }) // Promise<Blob>, an .xlsx from chart.table()
140
144
  chart.download(ExportFormat.PNG, { filename: 'revenue.png' })
141
145
  ```
142
146
 
@@ -155,6 +159,9 @@ Charts export finished: marks caught mid-animation are saved at their end state,
155
159
  - **3D PNG** comes from the chart's renderer at the current camera, with any entry animation finished, and labels, title and legend drawn on top. A `scale` beyond the GPU's limit throws.
156
160
  - **CSV** needs rows in `table()`, and throws otherwise. Dates are ISO 8601. Text that a spreadsheet would run as a formula is prefixed with `'`. `download` adds the byte order mark Excel needs; `toCSV()` does not.
157
161
  - **Fonts.** `toSVG()` is synchronous and names the theme's font stack. `chart.toStandaloneSVG()`, `toPNG` and `download` also embed any `@font-face` the page declares for that font, when its stylesheet is readable. A font that cannot be fetched stays linked and the text draws in the fallback fonts.
162
+ - **PDF is a picture.** `toPDF` places the chart on the page as a PNG, on 2D and 3D charts alike, so its text cannot be selected and it pixelates when zoomed far in. `scale` defaults to 3. `table: true` adds `table()` as real text on pages after it. Built-in PDF fonts are Western European only, so other scripts are drawn as small pictures. Tables stop at 25,000 rows, and a cell wider than a column ends in an ellipsis.
163
+ - **Excel needs rows.** `toExcel` writes `table()` to a real .xlsx with numbers as numbers, dates as dates in local time, and text as text. Cells starting with `=`, `+`, `-` or `@` are stored as text and never run. A chart without rows rejects with `ExportErrorCode.NoData`, and a chart with more rows than a worksheet holds does not list it. `image: true` adds a sheet holding the chart.
164
+ - **PDF and Excel load on use.** Their code, and `pdf-lib` and `fflate`, are dynamic imports, so a chart that never calls them keeps them out of your main bundle. If the load fails, the call rejects with `ExportErrorCode.Unavailable`.
158
165
  - **Web map tiles.** `toSVG()` keeps tiles as links, so that file needs the network. `toStandaloneSVG()`, `toPNG` and `download` fetch every tile and embed it. The tile server must send `Access-Control-Allow-Origin`: if any tile cannot be read within 20 seconds, they reject with `ExportErrorCode.Tainted` and name the tile, rather than save a map with holes. Without `tiles`, a slippy map has nothing to fetch and always exports.
159
166
 
160
167
  ## Keyboard
@@ -163,13 +170,13 @@ Charts export finished: marks caught mid-animation are saved at their end state,
163
170
 
164
171
  | Key | Action |
165
172
  | --- | --- |
166
- | Arrows | Move between marks. Left and Right stay in a series, Up and Down change series. Without series, or in a free layout such as a map or scatter, arrows go the way they point. |
173
+ | Arrows | Move between marks. Left and Right stay in a series, Up and Down change series. A Line has one mark per x, so there Down also moves along x. Without series, or in a free layout such as a map or scatter, arrows go the way they point. |
167
174
  | Shift and an arrow | Step through the series in data order, so every mark is reachable, including marks stacked on the same spot |
168
175
  | Home, End, Page Up, Page Down | First, last, or a tenth of the way through the series |
169
176
  | Enter, Space | Select the mark, as a click does, so `onSelect` fires and a drill map drills |
170
177
  | Escape | Leave the marks. The next arrow picks up where you were |
171
178
 
172
- The current mark gets a ring, the hover tooltip and an `aria-live` reading of that tooltip. `tooltip: false` removes the box and keeps the ring and the reading, because the reading is the only way a screen reader user gets the value. Marks reached are the ones given to `ctx.hover`, and on a zoomed chart only those inside the plot. A chart with no such marks, as with the signal and massive charts or empty data, stays `role="img"` with no tab stop. Exports leave all of this out. 3D charts ignore the option.
179
+ The current mark gets a ring, the hover tooltip and an `aria-live` reading of that tooltip. `tooltip: false` removes the box and keeps the ring and the reading, because the reading is the only way a screen reader user gets the value. Marks reached are the ones given to `ctx.hover`, and on a zoomed chart only those inside the plot. A chart with no such marks, as with the signal and massive charts, the recurrence plot, crossfilter histograms or empty data, stays `role="img"` with no tab stop. Exports leave all of this out. 3D charts ignore the option.
173
180
 
174
181
  With marks to reach, the svg becomes `role="application"`. `img` hides its children and is not a keyboard target, and a screen reader in browse mode would otherwise use the arrow keys itself. DOM focus stays on the svg and the cursor moves over the marks, so a redraw cannot lose focus and the marks are never written to.
175
182
 
@@ -190,6 +197,26 @@ import { Graph, MassiveDecimation, MassiveLineChart, MassiveScatterChart, ZoomAx
190
197
 
191
198
  Columnar data (`{ x, y, series, names, time }` with typed arrays) is the cheapest input. Rows work too and can be appended; columnar data cannot. With no SVG marks, `keyboard` has nothing to reach.
192
199
 
200
+ ## Styling
201
+
202
+ `chartStyle` styles any chart from the shared layer. Unset keys leave the chart as drawn. Colours take any CSS colour, or a theme token name such as `good`.
203
+
204
+ ```tsx
205
+ import { Bar, Line, ScaleKind, StrokeDash } from '@mstone6969/graph'
206
+
207
+ <Line data={rows} chartStyle={{ seriesColors: { Paid: '#0072b2' }, strokeWidth: 1.5, strokeDash: StrokeDash.Dashed, opacity: 0.8 }} />
208
+ <Bar data={rows} yScaleType={ScaleKind.Sqrt} aspectRatio={2} chartStyle={{ colors: ['#7a5230', '#3f7c85'], fontSize: 1.2 }} />
209
+ ```
210
+
211
+ - Colour: `colors`, `seriesColors`, `sequential`, `diverging`.
212
+ - Marks: `strokeWidth`, `strokeDash`, `strokeCap`, `strokeJoin`, `opacity`, `markSize`, `edges`. SVG marks; `opacity` also reaches 3D materials.
213
+ - Text: `fontSize`, `fontFamily`.
214
+ - 3D: `wireframe`, `antialias`, `pixelRatio`.
215
+ - Beside `chartStyle`: `aspectRatio` on every chart, `xScaleType` and `yScaleType` on SVG charts with x and y axes.
216
+ - `chart.renderer` says what draws the marks: `RenderType.Svg`, `Canvas` or `WebGL`. Canvas charts take colour and text styling only.
217
+
218
+ The playground offers each of these where it changes the chart in front of you. See the Styling page of the docs.
219
+
193
220
  ## Specialist charts
194
221
 
195
222
  Every chart here takes the shared options, and it has a component and a `GraphType` member.
@@ -251,6 +278,73 @@ import { MarketProfileChart, TpoBracket, TpoForm } from '@mstone6969/graph'
251
278
  <Graph of={MarketProfileChart} data={bars} form={TpoForm.Blocks} bracket={TpoBracket.Hour} />
252
279
  ```
253
280
 
281
+ ## Applied charts
282
+
283
+ These take the shared options too, and each has a component and a `GraphType` member. Their built-in samples are synthetic, so `meta.sample` shows the data shape and nothing more.
284
+
285
+ **Software diagrams.** `SequenceDiagram` orders messages between lifelines, with activation bars replayed from the calls, `alt`, `opt` and `loop` frames, and notes. `EntityRelationshipDiagram` takes one row per table column, as `information_schema` gives them, and derives crow's foot cardinality from nullability and keys. `ArchitectureDiagram` draws a C4 model at the context, container or component level from one data set. `NetworkTopologyDiagram` lays out routers, switches, servers, clouds and databases by tier, ring or force. `LogicGateDiagram` simulates a circuit in 0, 1 and X, and colours each wire by its state.
286
+
287
+ ```tsx
288
+ import { ArchitectureDiagram, ArchitectureLevel, EntityRelationshipDiagram, ErDetail, LogicGateDiagram, LogicSymbolStyle, NetworkTopologyDiagram, SequenceDiagram, SequenceNumbering, TopologyArrangement } from '@mstone6969/graph'
289
+
290
+ <Graph of={SequenceDiagram} data={[{ from: 'Web', to: 'API', label: 'POST /order', kind: 'sync' }, { from: 'API', to: 'Web', label: '201', kind: 'return' }]} numbering={SequenceNumbering.Nested} />
291
+ <Graph of={EntityRelationshipDiagram} data={columns} table="table_name" column="column_name" detail={ErDetail.Keys} /> // rows: { table, column, type, key, references, nullable }
292
+ <Graph of={ArchitectureDiagram} data={{ nodes, links }} level={ArchitectureLevel.Containers} /> // nodes: { id, name, kind, parent, technology, description, external }
293
+ <Graph of={NetworkTopologyDiagram} data={{ nodes, links }} arrangement={TopologyArrangement.Radial} /> // nodes: { id, name, kind, address }
294
+ <Graph of={LogicGateDiagram} data={{ gates, wires }} symbols={LogicSymbolStyle.Iec} /> // gates: { id, type, label, value }, wires: { from, to }
295
+ ```
296
+
297
+ **Machine learning.** All six plot results you already have: none of them trains a model. `LearningCurveChart` takes long rows of `epoch`, `run`, `split` and `value`, and draws the mean per split with a spread band, the best epoch and the overfitting gap. `ElbowPlot` marks the bend by Kneedle, the L method, chord distance or second difference, and says so when a curve has none. `DecisionBoundaryChart` contours your classifier's probabilities over two features. `FeatureImportanceChart` ranks scores, with whiskers and the tail folded into Other. `PartialDependencePlot` sweeps your `predict` function over background rows, or reads precomputed curves. `AttentionHeatmap` draws weights as given, with target tokens as rows, and `chart.check()` reports rows that do not sum to 1 instead of renormalising them.
298
+
299
+ ```tsx
300
+ import { AttentionHeadView, AttentionHeatmap, DecisionBoundaryChart, ElbowMethod, ElbowPlot, FeatureImportanceChart, FeatureImportanceSign, LearningCurveChart, OverfitShading, PartialDependencePlot, RunSpread, SilhouetteView } from '@mstone6969/graph'
301
+
302
+ <Graph of={LearningCurveChart} data={rows} x="epoch" y="value" run="run" split="split" validationSplit="val" spread={RunSpread.Confidence95} gap={OverfitShading.AfterBest} />
303
+ <Graph of={ElbowPlot} data={rows} x="k" y="inertia" method={ElbowMethod.Kneedle} silhouetteView={SilhouetteView.Panel} /> // rows: { k, inertia, silhouette }
304
+ <Graph of={DecisionBoundaryChart} data={{ points, predict: (x, y) => model.proba(x, y) }} /> // predict returns { class: probability } or a label
305
+ <Graph of={FeatureImportanceChart} data={rows} x="feature" y="gain" sign={FeatureImportanceSign.Value} top={12} />
306
+ <Graph of={PartialDependencePlot} data={background} x="age" predict={model.predict} />
307
+ <Graph of={AttentionHeatmap} data={{ source, target, heads: [{ name: 'Head 1', weights }] }} headView={AttentionHeadView.SmallMultiples} />
308
+ ```
309
+
310
+ **Strategy and research frameworks.** `SwotMatrix` and `RaciMatrix` fit wrapped text to their cells and count what they cannot show. `RaciMatrix` audits every task for exactly one Accountable and at least one Responsible: read `chart.plan.flagged`. `VanWestendorpChart` finds the four price points from one row per respondent, and `curves` picks between the two published PMC and PME conventions. `NpsGauge` takes 0 to 10 answers. `AnsoffMatrix` places initiatives by market and product. `PerceptualMap` plots two rated attributes with fitted property vectors, or a Gabriel biplot.
311
+
312
+ ```tsx
313
+ import { AnsoffDisplay, AnsoffMatrix, NpsGauge, PerceptualMap, RaciMatrix, SwotLayout, SwotMatrix, VanWestendorpChart, VanWestendorpCurves } from '@mstone6969/graph'
314
+
315
+ <Graph of={SwotMatrix} data={[{ quadrant: 'S', item: 'Loyal regulars' }]} layout={SwotLayout.Rows} />
316
+ <Graph of={RaciMatrix} data={[{ task: 'Launch', role: 'Lead', assignment: 'A/R' }]} grouping load />
317
+ <Graph of={VanWestendorpChart} data={rows} tooCheap="q1" cheap="q2" expensive="q3" tooExpensive="q4" curves={VanWestendorpCurves.Direct} />
318
+ <Graph of={NpsGauge} data={rows} score="score" />
319
+ <Graph of={AnsoffMatrix} data={rows} item="initiative" display={AnsoffDisplay.Bars} risk />
320
+ <Graph of={PerceptualMap} data={rows} name="brand" x="price" y="quality" xDomain={[1, 7]} yDomain={[1, 7]} vectors />
321
+ ```
322
+
323
+ **Life science.** `MaPlot` computes M and A with median or loess normalisation and BH or Bonferroni calls, from red and green channels, precomputed values or a DESeq2-style `baseMean`. `OncoPrint` reads cBioPortal and MAF alteration terms, with a row for every profiled sample so that frequencies keep the whole cohort as the denominator. `PedigreeChart` follows standard genetics notation. Status columns are boolean-like, so map PED affection codes first: in PED, 1 means unaffected. `RamachandranPlot` judges each residue against the MolProbity Top8000 regions for its class. The regions are simplified polygons, so use MolProbity itself for formal validation.
324
+
325
+ The Ramachandran regions are adapted from the Richardson Lab Top8000 data (Williams et al. 2018, Protein Science 27:293-315), used under CC BY 4.0. The chart's default subtitle carries this credit, so keep it, or credit the data yourself, if you replace the subtitle.
326
+
327
+ ```tsx
328
+ import { MaNormalization, MaPlot, OncoPrint, OncoSort, PedigreeCarrierMark, PedigreeChart, RamachandranPanel, RamachandranPlot } from '@mstone6969/graph'
329
+
330
+ <Graph of={MaPlot} data={rows} gene="gene" red="R" green="G" pvalue="p" normalization={MaNormalization.Loess} />
331
+ <Graph of={OncoPrint} data={maf} sample="Tumor_Sample_Barcode" gene="Hugo_Symbol" alteration="Variant_Classification" sort={OncoSort.Memo} />
332
+ <Graph of={PedigreeChart} data={people} carrierMark={PedigreeCarrierMark.Dot} showKey /> // rows: { id, father, mother, sex, affected, carrier, deceased, proband }
333
+ <Graph of={RamachandranPlot} data={residues} panel={RamachandranPanel.Glycine} /> // rows: { phi, psi, residue, nextResidue, omega, label }
334
+ ```
335
+
336
+ `<Graph>` and components keep `id` and `style` for themselves, so rename `PedigreeChart`'s id column, or set `HovmollerDiagram`'s `style`, through an instance.
337
+
338
+ **Rotation, waves and buildings.** `RelativeStrengthRotation` joins the financial module. It tracks relative strength and its momentum through four quadrants, a method developed by Julius de Kempenaer. His exact formula is proprietary, so `RotationMethod` offers two named approximations that will not match licensed software, or you can name your own computed columns with `ratio` and `momentum`. It does not reproduce licensed RRG output. `HovmollerDiagram` joins the earth science module and maps a field against time and longitude or latitude, with stated or fitted phase-speed guides. `FloorPlanMap` joins the maps and draws rooms in plain plan units, with one colour scale across floors, door swings, asset markers and on-screen floor buttons.
339
+
340
+ ```tsx
341
+ import { FloorDoorSwing, FloorPlanMap, HovmollerDiagram, HovmollerGuides, HovmollerSection, RelativeStrengthRotation, RotationMethod } from '@mstone6969/graph'
342
+
343
+ <Graph of={RelativeStrengthRotation} data={prices} benchmarkSymbol="SPX" method={RotationMethod.ZScore} tail={10} /> // rows: { date, series, close }
344
+ <Graph of={HovmollerDiagram} data={rows} section={HovmollerSection.Longitude} guides={HovmollerGuides.Fitted} /> // rows: { time, longitude, latitude, value }
345
+ <Graph of={FloorPlanMap} data={{ rooms, doors: [{ from: 'Lab', to: 'Hall', level: 2, swing: FloorDoorSwing.Left }], assets }} level={2} zoom /> // rooms: { name, level, value, points }
346
+ ```
347
+
254
348
  ## Maps
255
349
 
256
350
  Every 2D map takes `zoom` for drag, wheel, double click and on-screen buttons. `chart.viewport` does the same from code (`zoomIn`, `zoomOut`, `reset`, `fit`).
@@ -365,14 +459,17 @@ export class DotRankChart extends CartesianChart<DotRankOptions, DotRankAxes> {
365
459
 
366
460
  The full rules are in [AUTHORING.md](AUTHORING.md). A chart is finished when `yarn vitest run src/charts/<module>` passes and `yarn sheet <module>` renders it correctly in light and dark.
367
461
 
368
- ## Gallery
462
+ ## Site
369
463
 
370
- `gallery/` is a browsable catalog of every type: search, filters, a live chart per type, a control for each variant axis, a copyable snippet and the data table.
464
+ The site is at <https://malcolmston.github.io/graph/>. It covers the 628 chart classes with a page per chart, a family page for each of the 21 families, guides and reference docs, and a playground that runs TSX in the browser. Sample data is labelled as such. `gallery/` holds its source, and `.github/workflows/pages.yml` deploys it on every push to `main`.
371
465
 
372
466
  ```sh
373
- yarn dev # local gallery
467
+ yarn install # once
468
+ yarn dev # local site, on the port Vite prints
374
469
  yarn build:gallery # writes dist-gallery/
470
+ yarn generate:docs # rebuilds gallery/docs/generated after a change to src
375
471
  yarn e2e # checks dist-gallery in WebKit, screenshots in .cache/gallery/
472
+ yarn e2e:site # every docs page, family and chart link in WebKit, screenshots in .cache/site/
376
473
  yarn e2e:animated # every 2D class settles on its static render
377
474
  yarn e2e:maps # map input in WebKit, including tiles
378
475
  yarn e2e:live # streaming soak and fidelity sweep
@@ -0,0 +1,154 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }
2
+
3
+ var _chunk753UBLV2cjs = require('./chunk-753UBLV2.cjs');
4
+
5
+
6
+
7
+ var _chunkZ3JPIJSCcjs = require('./chunk-Z3JPIJSC.cjs');
8
+
9
+ // src/core/ExcelWriter.ts
10
+ var _fflate = require('fflate');
11
+ var TYPE = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";
12
+ var HEAD = '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>\n';
13
+ var MAIN = "http://schemas.openxmlformats.org/spreadsheetml/2006/main";
14
+ var PACKAGE = "http://schemas.openxmlformats.org/package/2006";
15
+ var LINKS = "http://schemas.openxmlformats.org/officeDocument/2006/relationships";
16
+ var CONTENT = "application/vnd.openxmlformats-officedocument";
17
+ var MAX_COLUMNS = 16384;
18
+ var MAX_ROWS = 1048576;
19
+ var MAX_TEXT = 32767;
20
+ var MAX_SERIAL = 2958465;
21
+ var DAY = 864e5;
22
+ var EPOCH = Date.UTC(1899, 11, 30);
23
+ var LEAP_BUG = 61;
24
+ var EMU_PER_PIXEL = 9525;
25
+ var [MIN_WIDTH, MAX_WIDTH] = [8, 60];
26
+ var MEASURED = 1e3;
27
+ var Style = { Date: 1, DateTime: 2, Header: 3, Guarded: 4 };
28
+ var FORMULA = /^[=+\-@\t\r\n]/;
29
+ var STYLES = `${HEAD}<styleSheet xmlns="${MAIN}"><numFmts count="2"><numFmt numFmtId="164" formatCode="yyyy\\-mm\\-dd"/><numFmt numFmtId="165" formatCode="yyyy\\-mm\\-dd\\ hh:mm:ss"/></numFmts><fonts count="2"><font><sz val="11"/><name val="Calibri"/></font><font><b/><sz val="11"/><name val="Calibri"/></font></fonts><fills count="2"><fill><patternFill patternType="none"/></fill><fill><patternFill patternType="gray125"/></fill></fills><borders count="1"><border><left/><right/><top/><bottom/><diagonal/></border></borders><cellStyleXfs count="1"><xf numFmtId="0" fontId="0" fillId="0" borderId="0"/></cellStyleXfs><cellXfs count="5"><xf numFmtId="0" fontId="0" fillId="0" borderId="0" xfId="0"/><xf numFmtId="164" fontId="0" fillId="0" borderId="0" xfId="0" applyNumberFormat="1"/><xf numFmtId="165" fontId="0" fillId="0" borderId="0" xfId="0" applyNumberFormat="1"/><xf numFmtId="49" fontId="1" fillId="0" borderId="0" xfId="0" quotePrefix="1" applyNumberFormat="1" applyFont="1"/><xf numFmtId="49" fontId="0" fillId="0" borderId="0" xfId="0" quotePrefix="1" applyNumberFormat="1"/></cellXfs><cellStyles count="1"><cellStyle name="Normal" xfId="0" builtinId="0"/></cellStyles></styleSheet>`;
30
+ var ExcelWriter = class _ExcelWriter {
31
+ #strings = /* @__PURE__ */ new Map();
32
+ #references = 0;
33
+ static async write(chart, { image, scale = 2 } = {}) {
34
+ const table = _chunk753UBLV2cjs.ExportText.rows(chart, "Excel export");
35
+ return _ExcelWriter.file(table, image ? await chart.toPNG({ scale }) : null, scale);
36
+ }
37
+ /** `image` is a PNG drawn at `scale`, placed at the chart's own size on a second sheet. */
38
+ static async file(table, image, scale) {
39
+ if (table.rows.length >= MAX_ROWS || table.columns.length > MAX_COLUMNS) {
40
+ throw new (0, _chunkZ3JPIJSCcjs.ChartExportError)("unsupported" /* Unsupported */, `A worksheet holds ${MAX_ROWS} rows and ${MAX_COLUMNS} columns, and this table has ${table.rows.length} rows and ${table.columns.length} columns. Use CSV.`);
41
+ }
42
+ return new _ExcelWriter().#workbook(table, image && new Uint8Array(await image.arrayBuffer()), scale);
43
+ }
44
+ #workbook(table, image, scale) {
45
+ const sheets = [["Data", this.#sheet(table)], ...image ? [["Chart", _ExcelWriter.#pictureSheet()]] : []];
46
+ const parts = {
47
+ "[Content_Types].xml": _ExcelWriter.#xml(_ExcelWriter.#types(sheets.length)),
48
+ "_rels/.rels": _ExcelWriter.#xml(_ExcelWriter.#links([`${LINKS}/officeDocument`, "xl/workbook.xml"])),
49
+ "xl/workbook.xml": _ExcelWriter.#xml(_ExcelWriter.#book(sheets.map(([name]) => name))),
50
+ "xl/_rels/workbook.xml.rels": _ExcelWriter.#xml(_ExcelWriter.#links(
51
+ ...sheets.map((_, i) => [`${LINKS}/worksheet`, `worksheets/sheet${i + 1}.xml`]),
52
+ [`${LINKS}/styles`, "styles.xml"],
53
+ [`${LINKS}/sharedStrings`, "sharedStrings.xml"]
54
+ )),
55
+ "xl/styles.xml": _ExcelWriter.#xml(STYLES),
56
+ "xl/sharedStrings.xml": _ExcelWriter.#xml(this.#stringTable())
57
+ };
58
+ sheets.forEach(([, xml], i) => {
59
+ parts[`xl/worksheets/sheet${i + 1}.xml`] = _ExcelWriter.#xml(xml);
60
+ });
61
+ if (image) {
62
+ parts["xl/worksheets/_rels/sheet2.xml.rels"] = _ExcelWriter.#xml(_ExcelWriter.#links([`${LINKS}/drawing`, "../drawings/drawing1.xml"]));
63
+ parts["xl/drawings/drawing1.xml"] = _ExcelWriter.#xml(_ExcelWriter.#drawing(image, scale));
64
+ parts["xl/drawings/_rels/drawing1.xml.rels"] = _ExcelWriter.#xml(_ExcelWriter.#links([`${LINKS}/image`, "../media/image1.png"]));
65
+ parts["xl/media/image1.png"] = [image, { level: 0 }];
66
+ }
67
+ return new Blob([_fflate.zipSync.call(void 0, parts)], { type: TYPE });
68
+ }
69
+ static #xml(text) {
70
+ return [_fflate.strToU8.call(void 0, text), { level: 6 }];
71
+ }
72
+ static #types(sheets) {
73
+ const override = (part, type) => `<Override PartName="/${part}" ContentType="${type}+xml"/>`;
74
+ const sheetParts = Array.from({ length: sheets }, (_, i) => override(`xl/worksheets/sheet${i + 1}.xml`, `${CONTENT}.spreadsheetml.worksheet`));
75
+ return `${HEAD}<Types xmlns="${PACKAGE}/content-types"><Default Extension="rels" ContentType="application/vnd.openxmlformats-package.relationships+xml"/><Default Extension="xml" ContentType="application/xml"/><Default Extension="png" ContentType="image/png"/>` + override("xl/workbook.xml", `${CONTENT}.spreadsheetml.sheet.main`) + sheetParts.join("") + override("xl/styles.xml", `${CONTENT}.spreadsheetml.styles`) + override("xl/sharedStrings.xml", `${CONTENT}.spreadsheetml.sharedStrings`) + (sheets > 1 ? override("xl/drawings/drawing1.xml", `${CONTENT}.drawing`) : "") + "</Types>";
76
+ }
77
+ static #links(...targets) {
78
+ const links = targets.map(([type, target], i) => `<Relationship Id="rId${i + 1}" Type="${type}" Target="${target}"/>`);
79
+ return `${HEAD}<Relationships xmlns="${PACKAGE}/relationships">${links.join("")}</Relationships>`;
80
+ }
81
+ static #book(names) {
82
+ const sheets = names.map((name, i) => `<sheet name="${name}" sheetId="${i + 1}" r:id="rId${i + 1}"/>`);
83
+ return `${HEAD}<workbook xmlns="${MAIN}" xmlns:r="${LINKS}"><bookViews><workbookView/></bookViews><sheets>${sheets.join("")}</sheets></workbook>`;
84
+ }
85
+ static #pictureSheet() {
86
+ return `${HEAD}<worksheet xmlns="${MAIN}" xmlns:r="${LINKS}"><sheetData/><drawing r:id="rId1"/></worksheet>`;
87
+ }
88
+ /** The element order is fixed by the schema, and Excel calls a file corrupt when it differs. */
89
+ #sheet({ columns, rows }) {
90
+ const widths = columns.map((column) => column.length + 1);
91
+ const header = columns.map((column, c) => this.#textCell(_ExcelWriter.#ref(c, 1), column, Style.Header));
92
+ const lines = [`<row r="1">${header.join("")}</row>`];
93
+ rows.forEach((row, r) => {
94
+ const number = r + 2;
95
+ const cells = row.slice(0, MAX_COLUMNS).map((cell, c) => {
96
+ if (r < MEASURED) widths[c] = Math.max(_nullishCoalesce(widths[c], () => ( 0)), _chunk753UBLV2cjs.ExportText.of(cell).length);
97
+ return this.#cell(_ExcelWriter.#ref(c, number), cell);
98
+ });
99
+ lines.push(`<row r="${number}">${cells.join("")}</row>`);
100
+ });
101
+ const pane = '<pane ySplit="1" topLeftCell="A2" activePane="bottomLeft" state="frozen"/><selection pane="bottomLeft" activeCell="A2" sqref="A2"/>';
102
+ const cols = widths.map((width, c) => `<col min="${c + 1}" max="${c + 1}" width="${Math.min(MAX_WIDTH, Math.max(MIN_WIDTH, width + 2))}" customWidth="1"/>`).join("");
103
+ const last = _ExcelWriter.#ref(Math.max(widths.length, 1) - 1, rows.length + 1);
104
+ return `${HEAD}<worksheet xmlns="${MAIN}"><dimension ref="A1:${last}"/><sheetViews><sheetView tabSelected="1" workbookViewId="0">${pane}</sheetView></sheetViews><sheetFormatPr defaultRowHeight="15"/>${cols && `<cols>${cols}</cols>`}<sheetData>${lines.join("")}</sheetData></worksheet>`;
105
+ }
106
+ #cell(ref, cell) {
107
+ if (typeof cell === "number") return Number.isFinite(cell) ? `<c r="${ref}"><v>${cell}</v></c>` : Number.isNaN(cell) ? "" : this.#textCell(ref, String(cell));
108
+ if (typeof cell === "boolean") return `<c r="${ref}" t="b"><v>${+cell}</v></c>`;
109
+ if (cell instanceof Date && !Number.isNaN(+cell)) return _nullishCoalesce(_ExcelWriter.#dateCell(ref, cell), () => ( this.#textCell(ref, _chunk753UBLV2cjs.ExportText.stamp(cell))));
110
+ const text = _chunkZ3JPIJSCcjs.ChartExporter.text(cell);
111
+ return text ? this.#textCell(ref, text) : "";
112
+ }
113
+ /** A date outside the range Excel can show has no serial, so it stays text. */
114
+ static #dateCell(ref, date) {
115
+ const days = (_chunk753UBLV2cjs.ExportText.wall(date) - EPOCH) / DAY;
116
+ const serial = days < LEAP_BUG ? days - 1 : days;
117
+ if (serial < 1 || serial > MAX_SERIAL) return null;
118
+ return `<c r="${ref}" s="${Number.isInteger(serial) ? Style.Date : Style.DateTime}"><v>${serial}</v></c>`;
119
+ }
120
+ #textCell(ref, text, style) {
121
+ const shown = _nullishCoalesce(style, () => ( (FORMULA.test(text) ? Style.Guarded : void 0)));
122
+ return `<c r="${ref}"${shown ? ` s="${shown}"` : ""} t="s"><v>${this.#string(text)}</v></c>`;
123
+ }
124
+ #string(text) {
125
+ this.#references++;
126
+ const known = this.#strings.get(text);
127
+ if (known !== void 0) return known;
128
+ const index = this.#strings.size;
129
+ this.#strings.set(text, index);
130
+ return index;
131
+ }
132
+ #stringTable() {
133
+ const items = [...this.#strings.keys()].map((text) => `<si><t xml:space="preserve">${_ExcelWriter.#escape(text)}</t></si>`);
134
+ return `${HEAD}<sst xmlns="${MAIN}" count="${this.#references}" uniqueCount="${this.#strings.size}">${items.join("")}</sst>`;
135
+ }
136
+ /** Spreadsheets read `_x0041_` in a string as "A", so a literal one has its underscore escaped the same way. */
137
+ static #escape(text) {
138
+ return _chunkZ3JPIJSCcjs.ChartExporter.writable(text.slice(0, MAX_TEXT)).replace(/_(?=x[0-9a-fA-F]{4}_)/g, "_x005F_").replace(/[&<>\r]/g, (char) => ({ "&": "&amp;", "<": "&lt;", ">": "&gt;", "\r": "&#13;" })[char]);
139
+ }
140
+ static #ref(column, row) {
141
+ let letters = "";
142
+ for (let left = column + 1; left > 0; left = Math.floor((left - 1) / 26)) letters = String.fromCharCode(65 + (left - 1) % 26) + letters;
143
+ return `${letters}${row}`;
144
+ }
145
+ /** The size comes from the PNG's own header: width and height follow its 16-byte preamble. */
146
+ static #drawing(image, scale) {
147
+ const header = new DataView(image.buffer, image.byteOffset);
148
+ const cx = Math.round(header.getUint32(16) / scale * EMU_PER_PIXEL), cy = Math.round(header.getUint32(20) / scale * EMU_PER_PIXEL);
149
+ return `${HEAD}<xdr:wsDr xmlns:xdr="http://schemas.openxmlformats.org/drawingml/2006/spreadsheetDrawing" xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main" xmlns:r="${LINKS}"><xdr:oneCellAnchor><xdr:from><xdr:col>0</xdr:col><xdr:colOff>0</xdr:colOff><xdr:row>0</xdr:row><xdr:rowOff>0</xdr:rowOff></xdr:from><xdr:ext cx="${cx}" cy="${cy}"/><xdr:pic><xdr:nvPicPr><xdr:cNvPr id="2" name="Chart"/><xdr:cNvPicPr><a:picLocks noChangeAspect="1"/></xdr:cNvPicPr></xdr:nvPicPr><xdr:blipFill><a:blip r:embed="rId1"/><a:stretch><a:fillRect/></a:stretch></xdr:blipFill><xdr:spPr><a:xfrm><a:off x="0" y="0"/><a:ext cx="${cx}" cy="${cy}"/></a:xfrm><a:prstGeom prst="rect"><a:avLst/></a:prstGeom></xdr:spPr></xdr:pic><xdr:clientData/></xdr:oneCellAnchor></xdr:wsDr>`;
150
+ }
151
+ };
152
+
153
+
154
+ exports.ExcelWriter = ExcelWriter;
package/dist/GraphType.js CHANGED
@@ -8,20 +8,15 @@ var GraphType = /* @__PURE__ */ function(GraphType) {
8
8
  GraphType["DivergingBarChart"] = "bar-diverging";
9
9
  GraphType["ButterflyChart"] = "bar-butterfly";
10
10
  GraphType["WaterfallChart"] = "bar-waterfall";
11
- GraphType["MarimekkoBar"] = "bar-marimekko";
12
- GraphType["HistogramBar"] = "bar-histogram";
13
11
  GraphType["RangeBarChart"] = "bar-range";
14
12
  GraphType["PopulationPyramid"] = "bar-population-pyramid";
15
- GraphType["BulletBar"] = "bar-bullet";
16
13
  GraphType["ProgressBars"] = "bar-progress";
17
14
  GraphType["GroupedStackedBar"] = "bar-grouped-stacked";
18
15
  GraphType["PercentChangeBar"] = "bar-percent-change";
19
16
  GraphType["TripleBarOverlay"] = "bar-triple-overlay";
20
17
  GraphType["IconlessRankBar"] = "bar-iconless-rank";
21
- GraphType["ParetoBar"] = "bar-pareto";
22
18
  GraphType["DateBarChart"] = "bar-date";
23
19
  GraphType["FacetedBarChart"] = "bar-faceted";
24
- GraphType["ErrorBarColumn"] = "bar-error";
25
20
  GraphType["LineChart"] = "line";
26
21
  GraphType["MultiLineChart"] = "multi-line";
27
22
  GraphType["AreaChart"] = "area";
@@ -36,9 +31,7 @@ var GraphType = /* @__PURE__ */ function(GraphType) {
36
31
  GraphType["DifferenceChart"] = "difference";
37
32
  GraphType["HorizonChart"] = "horizon";
38
33
  GraphType["RangeAreaChart"] = "range-area";
39
- GraphType["SmallMultipleLines"] = "small-multiple-lines";
40
34
  GraphType["RidgeLines"] = "ridge-lines";
41
- GraphType["ConnectedScatterTime"] = "connected-scatter-time";
42
35
  GraphType["DualAxisChart"] = "dual-axis";
43
36
  GraphType["FanChart"] = "fan";
44
37
  GraphType["ThresholdAreaChart"] = "threshold-area";
@@ -48,11 +41,8 @@ var GraphType = /* @__PURE__ */ function(GraphType) {
48
41
  GraphType["BubbleChart"] = "bubble-scatter";
49
42
  GraphType["RegressionScatter"] = "regression-scatter";
50
43
  GraphType["JitterPlot"] = "jitter-scatter";
51
- GraphType["StripScatter"] = "strip-scatter";
52
44
  GraphType["QuadrantChart"] = "quadrant-scatter";
53
45
  GraphType["ConnectedScatter"] = "connected-scatter";
54
- GraphType["HexbinScatter"] = "hexbin-scatter";
55
- GraphType["GridBinScatter"] = "gridbin-scatter";
56
46
  GraphType["RugScatter"] = "rug-scatter";
57
47
  GraphType["MarginalScatter"] = "marginal-scatter";
58
48
  GraphType["ErrorBarScatter"] = "errorbar-scatter";
@@ -60,12 +50,9 @@ var GraphType = /* @__PURE__ */ function(GraphType) {
60
50
  GraphType["ConvexHullScatter"] = "hull-scatter";
61
51
  GraphType["VoronoiScatter"] = "voronoi-scatter";
62
52
  GraphType["LabelledScatter"] = "labelled-scatter";
63
- GraphType["BeeswarmScatter"] = "beeswarm-scatter";
64
- GraphType["ContourScatter"] = "contour-scatter";
65
53
  GraphType["ParetoScatter"] = "pareto-scatter";
66
54
  GraphType["DropLineScatter"] = "dropline-scatter";
67
55
  GraphType["ChangeScatter"] = "change-scatter";
68
- GraphType["SunflowerScatter"] = "sunflower-scatter";
69
56
  GraphType["HistogramChart"] = "histogram";
70
57
  GraphType["DensityChart"] = "density";
71
58
  GraphType["BoxPlot"] = "box-plot";
@@ -88,7 +75,6 @@ var GraphType = /* @__PURE__ */ function(GraphType) {
88
75
  GraphType["BackToBackHistogram"] = "back-to-back-histogram";
89
76
  GraphType["BeanPlot"] = "bean";
90
77
  GraphType["DensityStrip"] = "density-strip";
91
- GraphType["RidgeSlabs3DChart"] = "distribution-ridgeline-3d";
92
78
  GraphType["Violin3DChart"] = "violin-3d";
93
79
  GraphType["CandlestickChart"] = "candlestick";
94
80
  GraphType["OHLCChart"] = "ohlc";
@@ -113,7 +99,7 @@ var GraphType = /* @__PURE__ */ function(GraphType) {
113
99
  GraphType["ReturnCalendar"] = "return-calendar";
114
100
  GraphType["ProjectionCone"] = "projection-cone";
115
101
  GraphType["VolatilitySurface"] = "volatility-surface";
116
- GraphType["Candlestick3D"] = "candlestick-3d";
102
+ GraphType["RelativeStrengthRotation"] = "relative-strength-rotation";
117
103
  GraphType["RadarLikeProfileChart"] = "comparison-profile";
118
104
  GraphType["TableLensChart"] = "comparison-table-lens";
119
105
  GraphType["SlopeGraphRanked"] = "comparison-slope-ranked";
@@ -121,14 +107,11 @@ var GraphType = /* @__PURE__ */ function(GraphType) {
121
107
  GraphType["ErrorBarChart"] = "comparison-error-bar";
122
108
  GraphType["EffectForestPlot"] = "comparison-forest";
123
109
  GraphType["GaugeBarsComparison"] = "comparison-gauge-bars";
124
- GraphType["SpanChart"] = "comparison-span";
125
110
  GraphType["FloatingBarChart"] = "comparison-floating-bar";
126
111
  GraphType["DeviationChart"] = "comparison-deviation";
127
112
  GraphType["RangeDotChart"] = "comparison-range-dot";
128
113
  GraphType["PairedBarChart"] = "comparison-paired-bar";
129
- GraphType["SmallMultipleBars"] = "comparison-small-multiple-bars";
130
114
  GraphType["CycleChart"] = "comparison-cycle";
131
- GraphType["TrellisChart"] = "comparison-trellis";
132
115
  GraphType["MeanLineChart"] = "comparison-mean-line";
133
116
  GraphType["IntervalChart"] = "comparison-interval";
134
117
  GraphType["RankedDotChart"] = "comparison-ranked-dot";
@@ -151,8 +134,6 @@ var GraphType = /* @__PURE__ */ function(GraphType) {
151
134
  GraphType["VennDiagram"] = "venn";
152
135
  GraphType["EulerDiagram"] = "euler";
153
136
  GraphType["UpSetPlot"] = "upset";
154
- GraphType["ConeFunnel"] = "cone-funnel";
155
- GraphType["ExtrudedPieChart"] = "extruded-pie";
156
137
  GraphType["Waffle3DChart"] = "waffle-3d";
157
138
  GraphType["RadarChart"] = "radar";
158
139
  GraphType["PolarAreaChart"] = "polar-area";
@@ -194,10 +175,6 @@ var GraphType = /* @__PURE__ */ function(GraphType) {
194
175
  GraphType["DecompositionTree"] = "decomposition-tree";
195
176
  GraphType["MindMap"] = "mind-map";
196
177
  GraphType["FishboneDiagram"] = "fishbone";
197
- GraphType["TreemapSkyline3D"] = "treemap-skyline-3d";
198
- GraphType["SunburstTower3D"] = "sunburst-tower-3d";
199
- GraphType["ConeTree3D"] = "cone-tree-3d";
200
- GraphType["SpherePack3D"] = "sphere-pack-3d";
201
178
  GraphType["ActivityRings"] = "activity-rings";
202
179
  GraphType["BatteryChart"] = "battery-level";
203
180
  GraphType["BulletChart"] = "bullet";
@@ -230,7 +207,6 @@ var GraphType = /* @__PURE__ */ function(GraphType) {
230
207
  GraphType["BurnupChart"] = "burnup";
231
208
  GraphType["CumulativeFlowChart"] = "cumulative-flow";
232
209
  GraphType["RoadmapChart"] = "roadmap";
233
- GraphType["StreamTimeline"] = "stream-timeline";
234
210
  GraphType["MarimekkoTime"] = "marimekko-time";
235
211
  GraphType["PeriodicHeatmap"] = "periodic-heatmap";
236
212
  GraphType["ChronologyChart"] = "chronology";
@@ -239,9 +215,6 @@ var GraphType = /* @__PURE__ */ function(GraphType) {
239
215
  GraphType["LifelineChart"] = "lifeline";
240
216
  GraphType["MilestoneTrendChart"] = "milestone-trend";
241
217
  GraphType["CycleTimeChart"] = "cycle-time";
242
- GraphType["SpiralTimeline"] = "spiral-timeline";
243
- GraphType["CalendarSkylineChart"] = "calendar-skyline";
244
- GraphType["ScheduleBlocksChart"] = "schedule-blocks";
245
218
  GraphType["WordCloudChart"] = "word-cloud";
246
219
  GraphType["PictogramChart"] = "pictogram";
247
220
  GraphType["IsotypeChart"] = "isotype";
@@ -286,7 +259,6 @@ var GraphType = /* @__PURE__ */ function(GraphType) {
286
259
  GraphType["AlluvialChart"] = "alluvial";
287
260
  GraphType["ChordFlow"] = "chord-flow";
288
261
  GraphType["ParallelSets"] = "parallel-sets";
289
- GraphType["StreamFlow"] = "stream-flow";
290
262
  GraphType["FlowMapLess"] = "flow-map-less";
291
263
  GraphType["CircularSankey"] = "circular-sankey";
292
264
  GraphType["RibbonFlow"] = "ribbon-flow";
@@ -295,7 +267,6 @@ var GraphType = /* @__PURE__ */ function(GraphType) {
295
267
  GraphType["DecisionTreeChart"] = "decision-tree";
296
268
  GraphType["StateTransitionChart"] = "state-transition";
297
269
  GraphType["SwimFlowChart"] = "swim-flow";
298
- GraphType["BumpFlow"] = "bump-flow";
299
270
  GraphType["CohortFlow"] = "cohort-flow";
300
271
  GraphType["RetentionFlow"] = "retention-flow";
301
272
  GraphType["ConversionFlow"] = "conversion-flow";
@@ -405,7 +376,6 @@ var GraphType = /* @__PURE__ */ function(GraphType) {
405
376
  GraphType["HeatMapGeo"] = "heat-map-geo";
406
377
  GraphType["ContourMap"] = "contour-map";
407
378
  GraphType["RidgelineMap"] = "ridgeline-map";
408
- GraphType["ThiessenMap"] = "thiessen-map";
409
379
  GraphType["CartogramDorling"] = "cartogram-dorling";
410
380
  GraphType["NonContiguousCartogram"] = "non-contiguous-cartogram";
411
381
  GraphType["HexTileMap"] = "hex-tile-map";
@@ -421,6 +391,7 @@ var GraphType = /* @__PURE__ */ function(GraphType) {
421
391
  GraphType["DrillDownMap"] = "drill-down-map";
422
392
  GraphType["SlippyPointMap"] = "slippy-point-map";
423
393
  GraphType["SlippyRegionMap"] = "slippy-region-map";
394
+ GraphType["FloorPlanMap"] = "floor-plan-map";
424
395
  GraphType["FlowMap"] = "flow-map";
425
396
  GraphType["ConnectionMap"] = "connection-map";
426
397
  GraphType["GreatCircleArcMap"] = "great-circle-arc-map";
@@ -503,8 +474,6 @@ var GraphType = /* @__PURE__ */ function(GraphType) {
503
474
  GraphType["SetRelationChart"] = "set-relation";
504
475
  GraphType["CobwebPlot"] = "cobweb";
505
476
  GraphType["TaylorSeriesChart"] = "taylor-series";
506
- GraphType["StrangeAttractor3D"] = "strange-attractor-3d";
507
- GraphType["ParametricSurface3D"] = "parametric-surface-3d";
508
477
  GraphType["WaveformChart"] = "signal-waveform";
509
478
  GraphType["OscilloscopeChart"] = "signal-oscilloscope";
510
479
  GraphType["StemSignalChart"] = "signal-stem";
@@ -512,21 +481,16 @@ var GraphType = /* @__PURE__ */ function(GraphType) {
512
481
  GraphType["TimeDomainDiffChart"] = "signal-time-domain-diff";
513
482
  GraphType["SpectrumChart"] = "signal-spectrum";
514
483
  GraphType["PeriodogramChart"] = "signal-periodogram";
515
- GraphType["SignalSpectrogramChart"] = "signal-spectrogram";
516
484
  GraphType["WaterfallSpectrum"] = "signal-waterfall-spectrum";
517
485
  GraphType["WaterfallSurface3DChart"] = "signal-waterfall-3d";
518
486
  GraphType["WaveletScalogram"] = "signal-wavelet-scalogram";
519
487
  GraphType["CepstrumChart"] = "signal-cepstrum";
520
- GraphType["CorrelogramChart"] = "signal-correlogram";
521
488
  GraphType["ImpulseResponseChart"] = "signal-impulse-response";
522
489
  GraphType["FilterResponseChart"] = "signal-filter-response";
523
- GraphType["PoleZeroChart"] = "signal-pole-zero";
524
490
  GraphType["AudiogramChart"] = "signal-audiogram";
525
491
  GraphType["SeismogramChart"] = "signal-seismogram";
526
492
  GraphType["ECGChart"] = "signal-ecg";
527
493
  GraphType["LogicAnalyzerChart"] = "signal-logic-analyzer";
528
- GraphType["EyeDiagramChart"] = "signal-eye-diagram";
529
- GraphType["ConstellationChart"] = "signal-constellation";
530
494
  GraphType["PhaseSpaceChart"] = "signal-phase-space";
531
495
  GraphType["PhaseSpace3DChart"] = "signal-phase-space-3d";
532
496
  GraphType["MassiveScatterChart"] = "massive-scatter";
@@ -536,6 +500,7 @@ var GraphType = /* @__PURE__ */ function(GraphType) {
536
500
  GraphType["SparkBar"] = "spark-bar";
537
501
  GraphType["CircosPlot"] = "circos-plot";
538
502
  GraphType["GenomeIdeogram"] = "genome-ideogram";
503
+ GraphType["HovmollerDiagram"] = "hovmoller-diagram";
539
504
  GraphType["Hydrograph"] = "hydrograph";
540
505
  GraphType["TernaryContour"] = "ternary-contour";
541
506
  GraphType["LexisDiagram"] = "lexis-diagram";
@@ -544,6 +509,27 @@ var GraphType = /* @__PURE__ */ function(GraphType) {
544
509
  GraphType["DependencyMatrix"] = "dependency-structure-matrix";
545
510
  GraphType["UmlClassDiagram"] = "uml-class-diagram";
546
511
  GraphType["MareyChart"] = "marey-train-graph";
512
+ GraphType["LogicGateDiagram"] = "logic-gate-diagram";
513
+ GraphType["EntityRelationshipDiagram"] = "entity-relationship-diagram";
514
+ GraphType["ArchitectureDiagram"] = "architecture-diagram";
515
+ GraphType["NetworkTopologyDiagram"] = "network-topology-diagram";
516
+ GraphType["SequenceDiagram"] = "uml-sequence-diagram";
517
+ GraphType["AttentionHeatmap"] = "attention-heatmap";
518
+ GraphType["LearningCurveChart"] = "learning-curve";
519
+ GraphType["ElbowPlot"] = "elbow-plot";
520
+ GraphType["DecisionBoundaryChart"] = "decision-boundary";
521
+ GraphType["FeatureImportanceChart"] = "feature-importance";
522
+ GraphType["PartialDependencePlot"] = "partial-dependence";
523
+ GraphType["SwotMatrix"] = "swot-matrix";
524
+ GraphType["RaciMatrix"] = "raci-matrix";
525
+ GraphType["NpsGauge"] = "nps-gauge";
526
+ GraphType["VanWestendorpChart"] = "van-westendorp";
527
+ GraphType["AnsoffMatrix"] = "ansoff-matrix";
528
+ GraphType["PerceptualMap"] = "perceptual-map";
529
+ GraphType["MaPlot"] = "ma-plot";
530
+ GraphType["OncoPrint"] = "oncoprint";
531
+ GraphType["PedigreeChart"] = "pedigree";
532
+ GraphType["RamachandranPlot"] = "ramachandran-plot";
547
533
  GraphType["Bar3DChart"] = "bar-3d";
548
534
  GraphType["Cylinder3DBars"] = "cylinder-3d-bars";
549
535
  GraphType["Stacked3DBars"] = "stacked-3d-bars";