Skip to content
Back to search

ggnet

MarketplaceWorks with Claude CodeGitHub

GGNet agent skills: grammar-of-graphics plot composition for .NET/Blazor and chart selection grounded in GGNet's renderable surface.

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today

Check it deeper on your machine

It has changed since its scan on 11 Nov 2026.

As a Claude Code plugin, install it and then ask Claude Code:

/plugin marketplace add keithmackay/mackayi/plugin install scanskillsafety@mackayiDo a deep scan of https://github.com/pablofrommars/GGNet with scanskillsafety

Or from a terminal, clone it and run it:

git clone https://github.com/keithmackay/scanskillsafety-skill ~/.claude/skills/scanskillsafetynode ~/.claude/skills/scanskillsafety/cli.cjs --deep 'https://github.com/pablofrommars/GGNet'

It checks the exact commit: every file, its packages against OSV (api.osv.dev), how it compares with this page's scan (findsafeskills.com receives the repository's address), and, if you agree, Claude reading every file with your own Claude subscription. It never runs the code.

Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/pablofrommars--ggnet/badge.svg)](/listings/pablofrommars--ggnet)

HTML

<a href="/listings/pablofrommars--ggnet"><img src="/api/listings/pablofrommars--ggnet/badge.svg" alt="findsafeskills safety rating" /></a>

Install

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

`2.0` builds publish to **GitHub Packages**. That feed requires authentication even for public packages, so add a `nuget.config` next to your solution with a [personal access token](https://github.com/settings/tokens) carrying the `read:packages` scope:

<?xml version="1.0" encoding="utf-8"?>
<configuration>
	<packageSources>
		<add key="ggnet" value="https://nuget.pkg.github.com/pablofrommars/index.json" />
	</packageSources>
	<packageSourceCredentials>
		<ggnet>
			<add key="Username" value="USERNAME" />
			<add key="ClearTextPassword" value="TOKEN" />
		</ggnet>
	</packageSourceCredentials>
</configuration>
dotnet add package GGNet --prerelease

The `1.4.0` release remains on [nuget.org](https://www.nuget.org/packages/GGNet/1.4.0).

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

.claude-plugin/marketplace.json · Manifest · 14 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

This file has changed since it was scanned, so this is not exactly the text that was scanned, and no line is marked. The findings are listed with the safety scan above.

  1. {
  2. "name": "ggnet",
  3. "owner": {
  4. "name": "Pablo Belin"
  5. },
  6. "description": "GGNet agent skills: grammar-of-graphics plot composition for .NET/Blazor and chart selection grounded in GGNet's renderable surface.",
  7. "plugins": [
  8. {
  9. "name": "ggnet",
  10. "source": "./",
  11. "description": "GGNet charting skill: the fluent DSL, chart selection, verified examples, and the snippet validator."
  12. }
  13. ]
  14. }
README.md · README · 340 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

This file has changed since it was scanned, so this is not exactly the text that was scanned, and no line is marked. The findings are listed with the safety scan above.

  1. [![License](https://img.shields.io/github/license/BlazorExtensions/Storage.svg?longCache=true&style=flat-square)](https://github.com/pablofrommars/GGNet/blob/main/LICENSE.TXT)
  2. [![Package Version](https://img.shields.io/badge/nuget-v1.4.0-blue.svg?longCache=true&style=flat-square)](https://www.nuget.org/packages/GGNet/1.4.0)
  3. # GG.Net Data Visualization
  4. GG.Net lets Data Scientists and Developers create interactive and flexible charts for .NET and [Blazor](https://dotnet.microsoft.com/apps/aspnet/web-apps/blazor) Web Apps.
  5. Taking its inspiration from the highly popular [ggpplot2](https://ggplot2.tidyverse.org) R package, GG.Net provides natively rich features for your Data Analysis Workflow. Build publication quality charts with just a few lines of code in C# and F#.
  6. [Learn more about GG.Net](https://pablofrommars.github.io/)
  7. ## Install
  8. `2.0` builds publish to **GitHub Packages**. That feed requires authentication even for public packages, so add a `nuget.config` next to your solution with a [personal access token](https://github.com/settings/tokens) carrying the `read:packages` scope:
  9. ```xml
  10. <?xml version="1.0" encoding="utf-8"?>
  11. <configuration>
  12. <packageSources>
  13. <add key="ggnet" value="https://nuget.pkg.github.com/pablofrommars/index.json" />
  14. </packageSources>
  15. <packageSourceCredentials>
  16. <ggnet>
  17. <add key="Username" value="USERNAME" />
  18. <add key="ClearTextPassword" value="TOKEN" />
  19. </ggnet>
  20. </packageSourceCredentials>
  21. </configuration>
  22. ```
  23. ```
  24. dotnet add package GGNet --prerelease
  25. ```
  26. The `1.4.0` release remains on [nuget.org](https://www.nuget.org/packages/GGNet/1.4.0).
  27. ## The DSL
  28. A plot is one fluent chain: `PlotContext.Build(source, x, y)` establishes the data source and default selectors, each `Geom_*` call adds a layer configured in place, `Scale_*` calls shape the axes and legends, and `.Style()` finishes the plot.
  29. ```csharp
  30. var plot = PlotContext.Build(points, o => o.X, o => o.Y)
  31. .Geom_Line(strokeWidth: 2, color: "#23d0fc")
  32. .Geom_HLine([1.0], y: o => o, label: o => "Baseline", lineType: LineType.Dashed)
  33. .Scale_Y_Continuous(formatter: new DoubleFormatter("N2"))
  34. .Style();
  35. ```
  36. ### Conventions
  37. - **`xxxBy` means data-driven.** `colorBy`, `fillBy`, `sizeBy`, `lineTypeBy` take an aesthetic *mapping* (built by `Scale_Color_Discrete`, `Scale_Fill_Continuous`, …): the value is computed per item, trains a scale, and feeds the legend. The unsuffixed twin (`color`, `fill`, `size`, `lineType`) is a constant applied to the whole layer. When a mapping is present it wins for its own aesthetic; the constant then still serves as the base for *other* aesthetics' legend swatches (a line-type legend draws its swatches in the constant color), so setting both is meaningful rather than an error.
  38. - **Positional arguments stop at the selectors.** Source and selector parameters (`x`, `y`, `ymin`, `open`, …) may be passed positionally; every aesthetic, event, or option after them is passed by name. The signatures are wide by design — configuration lives in one call — and named arguments are what keep call sites readable and stable.
  39. - **The vocabulary is SVG's.** `strokeWidth`, `opacity`, `fillOpacity`, `strokeOpacity`, `strokeColor` mean exactly what they mean in SVG. `width` and `height` are reserved for geometric extent in data units (`Geom_Bar`, `Geom_Tile`, `Geom_Violin`, `Geom_RidgeLine`).
  40. - **Interactivity is a uniform block.** Every data-mark geom takes `onclick`, `onmouseover`, `onmouseout`, and (where a hover surface makes sense) `tooltip`. When `tooltip` is set and no explicit hover handlers are given, the default hover shows it. Annotation geoms (`Geom_ABLine`, `Geom_HLine`, `Geom_VLine`, `Geom_Text`) and statistical summaries (`Geom_Boxplot`, `Geom_Violin`, `Geom_RidgeLine`) deliberately take no event block.
  41. ### Position ranges and updates
  42. Log10 positions require positive finite data, limits, and view bounds. Nonpositive values and infinities throw `GGNetUserException`; filter those rows or choose a continuous scale. Existing NaN missing-point and line-gap behavior is retained. Nonfinite position extents and view windows are rejected before tick generation.
  43. Automatic area ranges include their drawn baseline, which is zero in transformed coordinates (raw value one on a Log10 axis). Explicit limits and view windows still take precedence. Large finite numeric ranges use finite expansion and overflow-safe projection; very small, very large, or narrowly offset ranges use at most five evenly spaced major ticks. Expansion saturates at finite double endpoints. Equal view bounds receive singleton padding.
  44. In Blazor, changing `Context`, `Width`, or `Height` requests a refresh in both interactive modes and preserves view windows when resizing. `Static` retains its initial frame. A context may be reused sequentially after headless export; use separate contexts for concurrently mounted plots.
  45. ### Overview and detail charts
  46. GGNet does not maximize a panel or switch between compositions. A page that shows an overview and opens a related detail chart builds two plots and owns which one is showing. Three primitives make the hand-over explicit:
  47. - `context.XView` / `context.YView` read the current view window in data units (null when no window is set, and on discrete and `LocalDateTime` axes).
  48. - `Plot.ViewChanged` fires once per committed window change with its cause: `Gesture`, `HostCommand` or `Reset`. Name `Plot`'s type arguments when binding it to a method.
  49. - `.Panel(…, onActivate:, key:)` fires for a click anywhere in a sub-panel's plot area and reports which sub-panel it was. Mouse clicks on a plot with `Interactivity` wait about 200 ms so double-click reset wins. Enabled chart touch gestures consume touch clicks without that delay. With `CursorTooltip` or `Crosshair` the activation wrapper is absent; use an explicit Expand button.
  50. ```razor
  51. <Plot T="Reading" TX="Instant" TY="double" @ref=overview Context=@overviewContext RenderMode=@RenderMode.Interactive ViewChanged=@OnOverviewViewChanged />
  52. ```
  53. ```csharp
  54. // open: carry the overview's window to the detail chart
  55. if (overviewContext.XView is { } window)
  56. {
  57. await detail.ZoomToXAsync(window.min, window.max);
  58. }
  59. ```
  60. Things to keep in mind when several plots share a page:
  61. - **Gaps.** A `double.NaN` reading draws a gap only with `Geom_Line(piecewise: true)`; otherwise the line joins across it.
  62. - **One mutable source behind several plots.** Interactive composition runs off the UI thread and reads the list you gave it. Append or update on the renderer's synchronization context (`InvokeAsync`) before refreshing, or a render can enumerate a half-updated list.
  63. - **Closing.** Closing a detail on any click of its wrapper competes with taps the chart uses. An explicit close button keeps navigation apart from inspection.
  64. - **Hidden plots.** A plot hidden with CSS and `pointer-events: none` ignores input, but with `Interactivity` its gesture module still runs and still hears window-level scroll and touch events.
  65. The demo's `/overview-detail` page is a working example.
  66. ### Crosshair and readout
  67. `Interactivity = new() { Crosshair = true }` gives an interactive plot one inspected x position, drawn as a line with its x label in every panel that shares the x scale. A mouse moves it by hovering and pins it with a click; a finger pins it with a tap and enters inspection after holding for 400 ms within 10 screen pixels, then scrubs and pins on release. Active touch interaction owns the plot area by default; `TouchOwnership.ScrollY` permits native vertical scrolling. Left and Right step between sample times and Escape clears. A pin is a data value: it survives new data, resizing, view changes and a new `Context`, and only Escape, `ClearInspectionAsync` or the host end it.
  68. A layer joins the readout with `inspect:`. Each series finds its own reading at the inspected position, under a policy you choose per series, and says which sample it used:
  69. ```csharp
  70. PlotContext.Build(temperature, r => r.At, r => r.Value)
  71. .Scale_X_Instant()
  72. .Panel(p => p
  73. .Geom_Line(inspect: new("Temperature", r => FormattableString.Invariant($"{r.Value:0.0} °C")) { MaxDuration = Duration.FromMinutes(10) })
  74. .Geom_Line(target, r => r.At, r => r.Value, inspect: new("Target", r => FormattableString.Invariant($"{r.Value:0.0} °C"), InspectPolicy.Step)))
  75. .Panel(p => p
  76. .Geom_Point(gravity, r => r.At, r => r.Value, inspect: new("Gravity", r => FormattableString.Invariant($"{r.Value:0.000}"), InspectPolicy.Previous) { MaxDuration = Duration.FromHours(3) }))
  77. .Style();
  78. ```
  79. ```razor
  80. <Plot T="Sample" TX="Instant" TY="double" @ref=plot Context=@context RenderMode=@RenderMode.Interactive
  81. Interactivity=@(new() { Crosshair = true, Pan = true })
  82. @bind-Inspection=inspection ReadingsChanged=@OnReadingsChanged />
  83. ```
  84. - **Policies.** `Nearest` takes the closest sample on either side, `Previous` the last one at or before the position, both within `MaxDuration` (`Instant` x) or `MaxDistance` (numeric x). `Step` takes the last one however old: a value in effect. `Containing`, on `Geom_Bar` only, takes the bar whose x extent holds the position. Nothing is interpolated. A series with no qualifying sample reports `ReadingKind.Missing` with its `Missing` text, never a distant value.
  85. - **The readout is yours.** `ReadingsChanged` hands you `InspectionReadings<TX>`: the position, one `Reading<TX>` per series (name, group, the sample's own x, how it was obtained, the formatted value) and whether the position lies outside the visible window. GGNet draws the line, its label and a marker on each sample that was read; it renders no readout and no clear button.
  86. - **Two notifications.** `InspectionChanged` fires when the position or its pinned state changes through a gesture, a key or a clear. `ReadingsChanged` fires when the readout changes, which includes live data arriving under a pin that did not move.
  87. - **Navigation.** With `Pan` and an X wheel axis, an immediate one-finger horizontal drag pans and two fingers pan/pinch X, whether or not a crosshair is visible. A hold enters inspection instead. Explicit `Touch` options control navigation independently of mouse `Pan` and `Zoom`. There is no touch double-tap reset; provide an All button.
  88. - **Where readings exist.** On `Instant` and numeric x, for `Geom_Line`, `Geom_Point`, `Geom_Area` and `Geom_Bar`. Other geoms are not read. An inspected layer on a `LocalDateTime` or discrete x axis throws when the plot mounts with `Crosshair`; the line itself works there, snapped. Facets with `freeX` and flipped plots get a line local to one panel, with no pin and no readout. Separate plots are not synchronized: carry `Inspection` between them yourself.
  89. Four cautions for a page that uses it:
  90. - Give the readout a fixed height and put it where no finger covers it. A readout that grows when a reading arrives moves the chart under a resting pointer, and a pointer that leaves the plot area ends an unpinned crosshair.
  91. - Under a shared crosshair a touch tap pins and goes no further: it does not reach a mark's `onclick` or a click handler around the chart. A mouse click reaches both.
  92. - A marker sits at the row's own value. In a stacked area or bar it is not on the stacked outline.
  93. - Name `Plot`'s type arguments when binding `ReadingsChanged` or `ViewChanged` to a method.
  94. ### Touch policy and beta migration
  95. The beta touch contract replaces immediate drag-to-scrub with hold-to-scrub. A second contact
  96. abandons a provisional scrub and restores the committed pin before navigating; a third contact
  97. cancels. After two fingers become one, the remaining finger cannot start another gesture until
  98. all contacts lift. Pinch distance remains Euclidean, so fingers may sit on different linked panels.
  99. Use one explicit policy when the inferred `Pan`/`Crosshair` settings do not describe your host:
  100. ```csharp
  101. new InteractivityOptions
  102. {
  103. Crosshair = true,
  104. Pan = true,
  105. Touch = new()
  106. {
  107. Navigation = TouchNavigation.PanAndPinchX,
  108. Inspect = true,
  109. Ownership = TouchOwnership.ScrollY
  110. }
  111. }
  112. ```
  113. `TouchNavigation.TwoFingerX` reserves navigation for two fingers. `None` disables navigation.
  114. `Inspect` enables tap/hold inspection independently, including a host readout without a visible
  115. crosshair. `Touch = new()` disables chart touch gestures entirely while retaining mouse/pen
  116. configuration. Options remain initialization-only: remount with a new `@key` to change them.
  117. While a touch policy is on, the chart owns its touch taps: they reach no mark `onclick`, panel
  118. activation or surrounding click handler, and `CursorTooltip` stays a mouse feature. Only a chart
  119. with touch off keeps the browser's tap-as-click, and its tap standing in for hover on a cursor
  120. tooltip; it then inspects no position by touch. Give touch users visible controls for what a tap
  121. used to do.
  122. A touch gesture still in flight when the host commands the viewport (`ZoomToXAsync`,
  123. `ZoomToYAsync`, `ResetViewAsync`, `ShowLastAsync`, a window set before `RefreshAsync`, or a new
  124. `Context` whose x window differs from the one it replaces) is discarded: the host wins. So is one in flight when the host clears or sets the selection on a
  125. plot with touch inspection; without touch inspection a selection change leaves touch navigation
  126. alone. A wheel, mouse or pen view change made while a touch gesture is still in flight wins the
  127. same way. A mouse or pen pan keeps its preview until the frame of its own commit, or of a
  128. later host viewport command, is rendered; a frame that only brings new data does not end it. If no
  129. such frame arrives within ten seconds the preview is dropped and the chart stays usable. A `RefreshAsync` that only brings new data keeps the gesture and the pin. Replacing the `Context` discards an in-flight touch gesture in the browser whatever its window: the plot's panels are keyed by context, so their touch state is disposed with them. Only the server's acceptance rule tells a same-window replacement apart, and no browser client can use it. A dropped circuit is noticed only when the ten-second watchdog
  130. fires, since Blazor neither completes nor rejects a call in flight across a disconnect.
  131. Beta change: `ZoomToXAsync`, `ZoomToYAsync`, `ResetViewAsync` and `RefreshAsync` given an
  132. already-cancelled token now render nothing and throw `TaskCanceledException` under both
  133. `RenderMode.Interactive` and `RenderMode.InteractiveAuto`. `InteractiveAuto` previously ignored
  134. the token and rendered anyway. A cancelled command still leaves its window on the context, and
  135. the next refresh renders it.
  136. `Owned` (the default) installs `touch-action: none` on the plot-area viewport. `ScrollY` permits
  137. vertical page scrolling and may cancel a hold or scrub; it permits page pinch only when chart
  138. pinch is disabled. Neither policy changes the surrounding page. There is no touch Y navigation
  139. in this contract; `ZoomAxis.Y` remains meaningful for mouse/pen, and AutoFitY follows committed X
  140. changes. Explicit enabled touch requires unflipped Cartesian shared-X charts without free-X facets;
  141. unsupported default configurations leave those touch capabilities disabled.
  142. Overview and detail should use the same policy, with separate Expand, Close, All and Clear controls.
  143. Carry `Inspection` and the viewport between them. Clear changes selection only; All resets the
  144. viewport only. An offscreen selection stays a data coordinate rather than being clamped to an edge.
  145. Touch feedback is local: the plot root carries `data-ggnet-interaction` with `inspecting`,
  146. `navigating`, `pending` or `unavailable`, and removes it when settled. Provisional lines do not
  147. carry old timestamps or sample markers. Navigation hides stale ticks/grid until matching rendered
  148. frames arrive. A mouse or pen pan gives the same feedback: `navigating` from the moment the drag
  149. is recognized, then `pending` from release until its frame is rendered, with stale ticks, cursor
  150. label and markers hidden and a pinned line travelling with the marks. Its ten-second bound only
  151. drops the preview and the feedback; it never makes the chart `unavailable`. A wheel step, a key
  152. and a double-click reset set no feedback. A ten-second unresolved touch operation enters
  153. `unavailable`; remount the plot to resume.
  154. So does a touch commit whose call fails: an exception escaping `ViewChanged`, `InspectionChanged`
  155. or `ReadingsChanged` during a touch commit puts the chart in `unavailable` until remount, although
  156. the server has already committed the change. An exception escaping `ViewChanged` during a mouse or
  157. pen pan is not surfaced: the pan stays committed and the chart stays usable.
  158. In `unavailable` the last acknowledged cursor label, markers and frame stay visible beside the
  159. indication, since they are the last state the server confirmed. A mouse or pen pan still works
  160. there, and for the length of its preview the label and markers are hidden with the ticks.
  161. Place the plot and its readout inside a common wrapper to hide stale host values immediately,
  162. without waiting for a server callback, and to keep the last acknowledged values on show once the
  163. plot is `unavailable`. For example, give that wrapper `class="chart-inspection"`
  164. and wrap the values inside `.readout-values`:
  165. ```css
  166. .chart-inspection:has([data-ggnet-interaction]:not([data-ggnet-interaction="unavailable"])) .readout-values {
  167. visibility: hidden;
  168. }
  169. .chart-inspection:has([data-ggnet-interaction]:not([data-ggnet-interaction="unavailable"])) .readout::after {
  170. content: "Updating readings…";
  171. }
  172. .chart-inspection:has([data-ggnet-interaction="unavailable"]) .readout::after {
  173. content: "Last readings — reload to reconnect";
  174. }
  175. ```
  176. Keep the readout's dimensions stable so feedback does not move the chart under a held pointer.
  177. `ReadingsChanged` continues to report the actual selection belonging to its values.
  178. ### Stats
  179. Stats are sources, not layers: each `Stat.*` call returns a typed source that any geom draws unchanged, recomputed on every render pass so streaming data stays current.
  180. ```csharp
  181. // a histogram is Stat.Bin + Geom_Bar — there is no Histogram geom
  182. PlotContext.Build(Stat.Bin(readings, r => r.Value, bins: 20), b => b.Mid, b => b.Count)
  183. .Geom_Bar(width: 1.0)
  184. .Style();
  185. ```
  186. | Stat | Output | Draw with |
  187. |-|-|-|
  188. | `Stat.Bin` | `Bin` / `Bin<TKey>` (min, mid, max, count, density) | `Geom_Bar(x: b => b.Mid, y: b => b.Count)` |
  189. | `Stat.Density` | `DensityPoint` / `DensityPoint<TKey>` (at, density) | `Geom_Area`, `Geom_Line`, `Geom_Violin(width: d => d.Density)` |
  190. | `Stat.Count` | `Count<TKey>` (key, n) | `Geom_Bar` over categories |
  191. | `Stat.Summary` | `Summary` / `Summary<TKey>` (x, center, lower, upper) | `Geom_ErrorBar(y: s => s.Center, ymin: s => s.Lower, ymax: s => s.Upper)` |
  192. **Per-facet statistics are grouped statistics.** Compute with `groupBy:` and facet the output on the same key — the key is deliberately stated twice; a mismatch between them is almost certainly a bug:
  193. ```csharp
  194. PlotContext.Build(Stat.Bin(readings, r => r.Value, r => r.Tank, bins: 10), b => b.Mid, b => b.Count)
  195. .Geom_Bar(width: 1.0)
  196. .Facet_Wrap(b => b.Group)
  197. .Style();
  198. ```
  199. Statistics run over the whole source (per group when grouped). Stats that would depend on panel-trained state — a function traced over each panel's free-scale range — are out of scope by design.
  200. ### Geoms
  201. | Geom | Selectors | Mappings | Constants | Events | Tooltip |
  202. |-|-|-|-|-|-|
  203. | `Geom_Point` | `x`, `y` | `sizeBy`, `colorBy` | `size`, `color`, `opacity` | ✓ | ✓ |
  204. | `Geom_Line` | `x`, `y` | `colorBy`, `lineTypeBy` | `strokeWidth`, `color`, `opacity`, `lineType`, `piecewise` | ✓ | ✓ |
  205. | `Geom_Bar` | `x`, `y` | `fillBy` | `fill`, `fillOpacity`, `strokeColor`, `strokeOpacity`, `strokeWidth`, `position`, `width` | ✓ | ✓ |
  206. | `Geom_Area` | `x`, `y` | `fillBy` | `fill`, `fillOpacity`, `position` | ✓ | ✓ |
  207. | `Geom_Ribbon` | `x`, `ymin`, `ymax` | `fillBy` | `fill`, `fillOpacity` | ✓ | ✓ |
  208. | `Geom_ErrorBar` | `x`, `y`, `ymin`, `ymax` | `colorBy` | `strokeWidth`, `color`, `opacity`, `lineType`, `radius`, `position` | ✓ | ✓ |
  209. | `Geom_Segment` | `x`, `xend`, `y`, `yend` | — | `strokeWidth`, `color`, `opacity`, `lineType` | ✓ | ✓ |
  210. | `Geom_Tile` | `x`, `y`, `width`, `height` | `fillBy` | `fill`, `fillOpacity`, `strokeColor`, `strokeOpacity`, `strokeWidth` | ✓ | ✓ |
  211. | `Geom_Hex` | `x`, `y`, `dx`, `dy` | `fillBy` | `fill`, `opacity` | ✓ | ✓ |
  212. | `Geom_Radar` | `x`, `y` | `fillBy` | `fill`, `fillOpacity`, `strokeWidth` | ✓ | ✓ |
  213. | `Geom_Map` | `polygons` | `fillBy` | `fill`, `fillOpacity`, `strokeColor`, `strokeWidth` | ✓ | ✓ |
  214. | `Geom_Candlestick` | `x`, `open`, `high`, `low`, `close` | — | `strokeWidth`, `color`, `opacity`, `lineType` | ✓ | — |
  215. | `Geom_OHLC` | `x`, `open`, `high`, `low`, `close` | — | `strokeWidth`, `color`, `opacity`, `lineType` | ✓ | — |
  216. | `Geom_Volume` | `x`, `volume` | — | `fill`, `opacity` | ✓ | — |
  217. | `Geom_Boxplot` | `x`, `y` | `fillBy` | `size`, `fill`, `fillOpacity`, `strokeWidth` | — | — |
  218. | `Geom_Violin` | `x`, `y`, `width` | `fillBy` | `fill`, `fillOpacity`, `strokeColor`, `position` | — | — |
  219. | `Geom_RidgeLine` | `x`, `y`, `height` | `fillBy` | `fill`, `fillOpacity` | — | — |
  220. | `Geom_Text` | `x`, `y`, `angleBy`, `text` | `colorBy` | `size`, `anchor`, `weight`, `style`, `color`, `angle` | — | — |
  221. | `Geom_ABLine` | `a`, `b`, `label` | — | `strokeWidth`, `color`, `opacity`, `lineType`, `size`, `anchor`, `weight`, `style` | — | — |
  222. | `Geom_HLine` | `y`, `label` | — | `strokeWidth`, `color`, `opacity`, `lineType`, `size`, `anchor`, `weight`, `style` | — | — |
  223. | `Geom_VLine` | `x`, `label` | — | `strokeWidth`, `color`, `opacity`, `lineType`, `size`, `anchor`, `weight`, `style` | — | — |
  224. ### Theming
  225. Styling is split by one rule: **if it moves layout it's C# (`Style` — font sizes, margins, positions, because the server measures them); if it's paint it's CSS.** Paint targets stable semantic classes (`panel`, `x-break`, `legend-title`, …) scoped under `.ggnet[theme=name]`, selected by the `Theme` parameter on the `Plot` component.
  226. A theme is a block of variable overrides, not a stylesheet fork:
  227. ```css
  228. .ggnet[theme=mytheme] {
  229. --ggnet-bg: #1e1e1e;
  230. --ggnet-grid: #333;
  231. --ggnet-break-label: #9ca3af;
  232. }
  233. ```
  234. The base rules in `Themes/Default.css` read every paint through a `--ggnet-*` variable (backgrounds, grid, labels, titles, strips, legend, spinner — the file documents the full set), so a theme overrides only what it changes, anything it omits degrades to the default instead of rendering unstyled, and classes added by future GGNet versions are painted automatically. A test (`ThemeContractTests`) enforces the contract: every emitted class painted, every referenced variable defined, theme files only setting known variables.
  235. Notes:
  236. - Geom parameters accept css custom properties — `color: "var(--color-temperature)"` wires a layer to your design tokens.
  237. - Changing `--ggnet-font` affects rendering only: server-side text measurement assumes Inter until font metrics ship with the theme.
  238. - **Self-contained export**: `plot.AsStringAsync(selfContained: true)` / `SaveAsync(..., selfContained: true)` embeds the bundled theme as a `<style>` element so the SVG renders standalone; off by default — app-hosted output is styled by the app's stylesheet.
  239. ## Agent Skill
  240. The repo ships a model-facing skill for AI coding agents under [skills/ggnet/](skills/ggnet/) — the DSL manual, a data-shape → chart selection guide, 30 compile- and render-verified example recipes, and a snippet validator ([skills/ggnet/scripts/validate.cs](skills/ggnet/scripts/validate.cs)). Nothing in it is hand-maintained prose: signatures are extracted from source, examples are pinned gallery tests, and drift is caught by the test suite — the skill version *is* the library version.
  241. The repo is its own single-plugin marketplace ([`.claude-plugin/marketplace.json`](.claude-plugin/marketplace.json)), so consuming projects install the skill straight from it.
  242. **Claude Code**, from GitHub:
  243. ```
  244. /plugin marketplace add pablofrommars/GGNet
  245. /plugin install ggnet@ggnet
  246. ```
  247. **Claude Code**, from a local checkout (e.g. a repo that vendors GGNet):
  248. ```
  249. /plugin marketplace add path/to/GGNet
  250. /plugin install ggnet@ggnet
  251. ```
  252. **Codex** consumes the same skill via the [`.codex-plugin/plugin.json`](.codex-plugin/plugin.json) manifest; the agent-neutral manifest at the root ([plugin.json](plugin.json)) follows the [agentskills.io](https://agentskills.io) layout for everything else.
  253. Two pieces of the skill are live tooling and need the GGNet source tree present (a clone or a vendored copy — not just the installed skill): `scripts/validate.cs` compiles snippets against the in-repo projects, and the MCP server is registered with
  254. ```
  255. claude mcp add ggnet -- dotnet run --project path/to/GGNet/src/GGNet.Mcp
  256. ```
  257. ### Examples Gallery
  258. | | | |
  259. |-|-|-|
  260. ![](https://github.com/pablofrommars/GGNet.Site/blob/master/wwwroot/img/scatterplot.png) | ![](https://github.com/pablofrommars/GGNet.Site/blob/master/wwwroot/img/bubbleplot.png) | ![](https://github.com/pablofrommars/GGNet.Site/blob/master/wwwroot/img/barchart.png)
  261. ![](https://github.com/pablofrommars/GGNet.Site/blob/master/wwwroot/img/candlestick.png) | ![](https://github.com/pablofrommars/GGNet.Site/blob/master/wwwroot/img/linechart.png) | ![](https://github.com/pablofrommars/GGNet.Site/blob/master/wwwroot/img/areachart.png)
  262. ![](https://github.com/pablofrommars/GGNet.Site/blob/master/wwwroot/img/barplot.png) | ![](https://github.com/pablofrommars/GGNet.Site/blob/master/wwwroot/img/stacked.png) | ![](https://github.com/pablofrommars/GGNet.Site/blob/master/wwwroot/img/hbarplot.png)
  263. ![](https://github.com/pablofrommars/GGNet.Site/blob/master/wwwroot/img/lolipop.png) | ![](https://github.com/pablofrommars/GGNet.Site/blob/master/wwwroot/img/errorbar.png) | ![](https://github.com/pablofrommars/GGNet.Site/blob/master/wwwroot/img/violin.png)
  264. ![](https://github.com/pablofrommars/GGNet.Site/blob/master/wwwroot/img/hex.png) | ![](https://github.com/pablofrommars/GGNet.Site/blob/master/wwwroot/img/ridgeline.png) | ![](https://github.com/pablofrommars/GGNet.Site/blob/master/wwwroot/img/choropleth.png)
  265. ![](https://github.com/pablofrommars/GGNet.Site/blob/master/wwwroot/img/CFR.png) | ![](https://github.com/pablofrommars/GGNet.Site/blob/master/wwwroot/img/abline.png) | ![](https://github.com/pablofrommars/GGNet.Site/blob/master/wwwroot/img/bubblemap.png)

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.