Skip to content
Source
Sign inSign up
TanStack/charts

Support `radialGradient` entries in `ChartSpec.gradients` #129

Closedtoomingos(GitHub profile, opens in a new tab) opened this issue 0 comments

Version: @tanstack/charts 0.16.0.

gradients declares linear gradients (ChartLinearGradient: x1/y1/x2/y2 in objectBoundingBox percent plus stops) that the renderer and export path emit into <defs>. Radial gradients (cx/cy/r/fx/fy in objectBoundingBox, same stop shape) are the standard way to give arcs, donuts and gauges a lit centre, and are one-liners in visx (RadialGradient), Nivo and Highcharts.

Today a radial fill has to be injected by the host outside the chart svg, so it is missing from renderChartImage/serializeChartSvg output and tied to the DOM host.

Would it be possible to accept { type: 'radial', cx, cy, r, fx?, fy?, stops } alongside the existing linear entries, emitted by the same resource path?

  1. tannerlinsley closed this

Sign in to join this conversation.