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

Modifying the plotly chart label (chart name, x and y axis label)

Open nana123652 opened this issue 4 years ago • 1 comments

Hi, thank you for the library; it's really awesome.

  1. In regards to the pivotable.js chart with plotly, what will be the way to modify the chart label like the chart name, and the x and y-axis label?
  2. Also my chart labels only with the chart name and axis details show when I click on the legend? Would you know the root cause?

nana123652 avatar Feb 23 '21 19:02 nana123652

You can achieve it by below code

<PivotTable
	data={data}
	plotlyOptions={{
		title: 'Chart Title You Want', // Title
		xaxis: { title: 'X Axis Label' }, // X-Axis
		yaxis: { title: 'Y Axis Label' } // X-Axis
	}}
	{...PivotData}
/>

vinitgala avatar Dec 20 '23 09:12 vinitgala