react-pivottable icon indicating copy to clipboard operation
react-pivottable copied to clipboard

Support Treemap

Open Tomtomgo opened this issue 4 years ago • 0 comments

As far as I can tell, Plotly supports treemaps (https://plotly.com/javascript/treemaps/).

The default Plotly renderers don't include a treemap though:

function createPlotlyRenderers(PlotlyComponent) {
  return {
    'Grouped Column Chart': makeRenderer(PlotlyComponent, { type: 'bar' }, { barmode: 'group' }),
    'Stacked Column Chart': makeRenderer(PlotlyComponent, { type: 'bar' }, { barmode: 'relative' }),
    'Grouped Bar Chart': makeRenderer(PlotlyComponent, { type: 'bar', orientation: 'h' }, { barmode: 'group' }, true),
    'Stacked Bar Chart': makeRenderer(PlotlyComponent, { type: 'bar', orientation: 'h' }, { barmode: 'relative' }, true),
    'Line Chart': makeRenderer(PlotlyComponent),
    'Dot Chart': makeRenderer(PlotlyComponent, { mode: 'markers' }, {}, true),
    'Area Chart': makeRenderer(PlotlyComponent, { stackgroup: 1 }),
    'Scatter Chart': makeScatterRenderer(PlotlyComponent),
    'Multiple Pie Chart': makeRenderer(PlotlyComponent, { type: 'pie', scalegroup: 1, hoverinfo: 'label+value', textinfo: 'none' }, {}, true)
  };
}

I tried adding a Treemap renderer like this:

    'Treemap': makeRenderer(PlotlyComponent, {type: 'treemap'})

But that only showed a standard line chart.

Is it possible to add a Treemap renderer?

Tomtomgo avatar Sep 30 '21 08:09 Tomtomgo