How to scale bubble size

How to scale bubble size in Apose.Slides bubble chart?

Hi
Liyao,


Thanks for your interest in Aspose.Slides.

You can use ChartEx.Width and ChartEx.Height property to set any size of the charts in presentation. You can get existing width and height of the chart and scale them to new values as per your requirement.

Many Thanks,

I need to scale the size of the bubbles on the chart not the whole chart. In the MS PowerPoint there's an option under Format DataSeries>>Scale bubble size to %. I was wondering if Fusion Charts allow to set the value for that option.

Thank you!

Hi Liyao,


Please use the following code snippet to set the bubble size for charts series.

//Instantiate PresentationEx class that represents PPTX file
PresentationEx pres = new PresentationEx();

//Access first slide
SlideEx sld = pres.Slides[0];

// Add chart with default data
ChartEx chart = sld.Shapes.AddChart(ChartTypeEx.Bubble , 0, 0, 500, 500);

//Getting the chart data worksheet
ChartDataCellFactory fact = chart.ChartData.ChartDataCellFactory;

//Take first chart series
ChartSeriesEx series = chart.ChartData.Series[0];

ChartCellCollection col = series.BubbleSize;
int scale=1;
foreach (ChartDataCell cell in col)
{
cell.Value = scale*5;
scale += 1;
}

pres.Write(“D:\Aspose Data\Charts.pptx”);

Please share if you feel any issue.

Many Thanks,

That solution does not solve the issue. It only changes the value for the bubble size but the bubbles on the chart still look the same. In the attached printscreen (img1.jpg) you can see original chart and on img2.jpg you can see the same chart with the same bubblesize values but the bubblesize scale (under Format Data Series) had been set to 30%. It was done in MS PowerPoint, I’m trying to get the same effect from Aspose.Slides.

Thank you!

Hi Liyao,


I verified the code snippet shared using Aspose.Slides for .NET 6.1.0 and it worked fine on my end. Please share the complete source project reproducing the issue so that I may help you out further in this regard.

Many Thanks,

Hello,

In your example you are modifying the data for the bubblesize, so on mouse over for the bubblechart in PowerPoint it will be showing incorrect data.

Thank youv

There's a BubbleScale Property available for Aspose.Cells.Charts, but it seems to be not available for Aspose.Slides.

Thank you.

Hi,


I agree with the information shared by you and I also shared the way to implement the same in Aspose.Slides. I would again request you to please share the source presentation along with the sample project code so that I may help you out further.

Many Thanks,

Attached please find a project with our code. We also experiencing problem with datalabel.TextFrame.Text method. This method causes PowerPoint 2007 to crash.

Steps to reproduce the issue:

  1. Run the code
  2. Open created PowerPoint file and go to ‘Save As’
  3. When click ‘Save’ button PowerPoint will through ‘Microsoft Office PowerPoint has stopped working’.

Hi Liyao,


I have worked with the sample project shared by you. I have been able to set the bubble size. Actually, you need to set the bubble size relative to each other. The sample project has been modified for your convenience to observe the effect of change. Even in PowerPoint, you can observe that you may scale one bubble size and rest all gets automatically updated relative to that. For your kind reference, I have also attached the generated presentation.

I have observed the presentation crashing issue and an issue with ID SLIDESNET-33405 has been created in our issue tracking system to further investigate and resolve the issue. This thread has been linked with the issue so that you may be automatically notified once the issue will be resolved.

We are sorry for your inconvenience,

The issues you have found earlier (filed as SLIDESNET-33405) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.