Skip to content

Bug: Pie charts doesn't show labels on drill-down breakpoints #3

Description

@Guada-pdls

Bug: Data labels disappear after drilling down

Description

When using drilldown on a pie chart, clicking a pie slice to zoom into the nested breakdown data correctly re-renders the chart with the sub-level data, but the labels don't show up at the drilled-in level.

Steps to Reproduce

  1. Set up a bar chart with drilldown:
   <%= trackplot_chart data do |c| %>
          <% c.pie :count, label_key: :company, donut: true %>

          <% c.tooltip %>
          <% c.legend %>
          <% c.drilldown :breakdown %>
    <% end %>
  1. Use nested data with a breakdown key, e.g.:
   @data = [
     { region: "North", revenue: 500, breakdown: [
       { region: "NYC", revenue: 200 },
       { region: "Boston", revenue: 300 }
     ]}
   ]
  1. Click on the pie slice that has the breakdown (e.g. "North").
  2. Observe the drilled-in chart.

Expected Behavior

After drilling down, the chart should show the sub-data with the labels populated from data_key (e.g. "NYC", "Boston"), the same way labels render at the root level.

Actual Behavior

The chart drills down and the data itself is broken out correctly, but the labels are blank or missing at the drilled-in level.

Additional Context

  • Happens with c.pie + c.drilldown; haven't yet confirmed whether bar/heatmap/treemap drilldown is also affected.
  • Trackplot version: 3.0.0
  • Rails version: 8.1.3
Grabacion.de.pantalla.2026-07-13.a.la.s.2.10.31.p.m.mov

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