Skip to content

Support radialGradient entries in ChartSpec.gradients #129

Description

@toomingos

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?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions