We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Show additional values on hover over of bubble chart

Hi Team,

Could you please suggest, is there an option to show additional values on hover over of a bubble in bubble chart ? I mean can we show any other additional values other than x / y / size values of a bubble ? If yes, please help with an example using Cells java.

Thanks,
Thilak Babu

@Thilakbabu,

I am not sure what else you want to show additional values. Aspose.Cells follows MS Excel standards and specifications in drawing charts. Could you please create your chart in MS Excel manually which should show your desired additional values on hovering over bubbles, save the file and post us, we will check it soon.

@Thilakbabu,

There is no option to show additional values on hover over of a bubble in chart. You can set the properties of DataLabels to show or not. Please see the following code for your reference.

Sample Code:

Workbook workbook = new Workbook("sample.xlsx");
	Worksheet worksheet = workbook.getWorksheets().get(0);
	Chart chart = worksheet.getCharts().get(0);
	Series series =  chart.getNSeries().get(0);
	ChartPointCollection points= series.getPoints();
	DataLabels label = series.getDataLabels();
	label.setShowSeriesName(true);
	label.setShowCategoryName(true); //Corresponding X value in the bubble chart
	label.setShowValue(true); //Corresponding Y value in the bubble chart
	label.setShowBubbleSize(true);
	label.setShowLegendKey(true); 
	
	// or you can custom the DalaLabel for each ChartPoint
	int pointCount = points.getCount();
	for(int i = 0; i < pointCount; i++)
	{
		DataLabels pointLabel = points.get(i).getDataLabels(); 
		pointLabel.setText("Additional text");
	}
    workbook.save("output.xlsx");