Skip to content

Support states on polar marks (radialArc, radialArea, radialDot) and geoShape #126

Description

@toomingos

Version: @tanstack/charts 0.16.0.

Cartesian marks accept states (when: { focus } + style + transition) so a focused or unmatched datum can change fillOpacity, stroke, r, etc. natively. The polar marks and geoShape do not declare states in their option types (RadialArcOptions, RadialAreaOptions, RadialDotOptions, PolarOptions, GeoShapeOptions), although the scene layer already resolves states for any initialized mark that carries the field: a wrapper that sets states: { data, definitions } on initialize works in 0.15.0 and 0.16.0.

Without it, legend hover dim and focus lift on pie, donut, gauge, radar and choropleth have to be baked into the colour channel (color-mix alpha per datum), which loses the transition and cannot dim url(#…) pattern paints at all.

Would it be possible to expose states on RadialArcOptions, RadialAreaOptions, RadialDotOptions, PolarOptions and GeoShapeOptions, using the same ChartMarkState type the Cartesian marks take? Hover dim from a legend or focus is a standard affordance in Recharts, ECharts and Nivo for pie, radar and map series.

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