Skip to content

A combo chart silently has no drill-through: ComposedChart is the one cartesian branch that never receives the click props #4692

Description

@yinlianghui

Measured while implementing #4672's ruled item-level series work, and deliberately not widened into it: different defect class (a whole family's wiring, not the series a click reports), and it would add a verification surface that card does not carry.

What is measured

AdvancedChartImpl builds cartesianClickProps once and applies it to exactly one element:

  • packages/plugin-charts/src/AdvancedChartImpl.tsxcartesianClickProps is constructed near the other click props, and its only application is on the final cartesian ChartComponent (the bar / horizontal-bar / line / area branch).
  • The combo branch returns earlier, from its own ComposedChart element, which is rendered with data and no click props at all.

So a chart whose family resolves to combo fires onChartClick never — not on a mark, not on the axis. Its marks are the same Bar / Line / Area components the drillable branch renders.

Why it is worth a card rather than nothing

The prop's own doc comment says drill is "Wired for bar/horizontal-bar/line/area/pie/donut/funnel. Other chart types are no-ops in L1", so combo being a no-op is declared, and this is not a contract breach. Two things still make it worth recording:

  1. The family is DERIVED, not only authored.effectiveChartFamily(baseChartType, series) resolves a chart to combo when its series declare different families (Vocabulary consolidation (#2901): what shipped, and why Track C items 1–3 are not planned #2945's fix). So adding type: 'line' to one series of a drillable bar chart silently turns that chart's drill-through off, with nothing in the authored spec saying drill was touched. The author changed a mark and lost an interaction.
  2. The same doc line is already drifting. It lists scatter / treemap / sankey as no-ops, but those three each have a wired handler (scatterClickProps, treemapClickProps, sankeyClickProps). So the comment is not a reliable statement of what is wired, in either direction.

Not measured, deliberately

Whether combo should drill is a product question, not a defect reading — a combo plots several measures on one plot, so what a click there means (which series, which axis) needs the same kind of answer #4672's ruling gave the pivoted case. This card records the state and the derived-family trap; it does not presume the fix.

Related: #4672 (the cartesian click's series resolution, where this was measured), #2945 (derived combo family).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions