We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Can''t add a referece to an IChartSerie name property

Hello. I'm coding something like:

Dim chart As Implementation.Shapes.ChartShapeImpl = sheet.Charts(0)

Dim colCha As Implementation.Collections.ShapesCollection = chart.Parent

Dim colSer As Syncfusion.XlsIO.Implementation.Charts.ChartSeriesCollection = chart.Series(0).Parent

For j = 0 To W Step 1
Dim ii As IChartSerie
ii = colSer.Add()
ii.Name = mySheet.Range(x, 1).Text
ii.CategoryLabels = sheetDatos.Range(x, 2)
ii.Values = sheetDatos.Range(x, 3)
ii.Bubbles = sheetDatos.Range(x, 4)
x += 1
Next

My problem is the line where I name the series. I want to name the series making reference to the content of a cell, in order to change the name of the series in case the text of the cell is changed. But if I use

ii.Name = mySheet.Range(x, 1)

I get an error, because the property 'name' of the class IChartSerie is a string, instead of a range... Any solution? I don't want to use macros...


8 Replies

YG Yavanaarasi G Syncfusion Team June 24, 2008 12:57 PM UTC

Hi Jaime,

Thank you for your interest in Syncfusion products.

I am not able to reproduce the issue that you mentioned here. I have created a simple sample to test this issue. Here is works without exception. Please refer the sample in the below link:

http://websamples.syncfusion.com/samples/XlSIO_Chartseriename.Zip

Please take a look into the above sample and if still the issue exists, could you please try reproducing it in the above sample and send us the modified sample so that we could sort out the cause of the issue and provide you a solution?

Regards,
G.Yavana





AD Administrator Syncfusion Team June 25, 2008 01:55 PM UTC

G.Yavana:

Heya! Well, the "problem" (that actually it's not a bug) is... there are some charts in excel (As Bubbles) where, for each series, you can define a "X Value", "Y Value", "Size" and a "Name". The class IChartSerie names those properties as "CategoryLabels", "Values", "Bubbles" and "Name" in the same order. CategoryLabels, Values and Bubbles properties are Syncfusion.XlsIO.IRange type. In the other hand, Name is a simple (and static)String. If i have a table as this in excel:

a b c d
1 A 100 100 50
2 B 150 50 90
3 C 50 150 35

And i create my series as this:

serie1.name = mySheet.range(1,1).Text ' BECAUSE I CAN'T USE AN IRANGE
serie1.CategoryLabels = mySheet.range(1,2)
serie1.Values = mySheet.range(1,3)
serie1.Bubbles = mySheet.range(1,4)

I'll get my chart working fine. BUT, if, working in excel, the user changes that table to this:

a b c d
1 X 150 100 54
2 M 150 150 95
3 P 250 150 50

The size, the x and y position of my bubbles will change, but name will stay as A, B and C, because the property NAME does not make reference to the content of a cell or a range, it's an static value.

You should change the type of property "name" on IChartSeries Class. From String to a Range, in order to allow the final user (Excel user) to rename the series class.



YG Yavanaarasi G Syncfusion Team June 26, 2008 01:34 PM UTC

Hi Jaime,

Thank you for your update.

We are working on this issue. In the mean time could you please provide the excel file that you are created using XlSIO it will be easy for us to reproduce the issue in our side and provide you a solution?

Please let me know if you have any other concerns.

Regards,
G.Yavana



AD Administrator Syncfusion Team June 26, 2008 04:22 PM UTC

Heya!!

Hope it helps.

See ya



Prueba_5620170c.zip


YG Yavanaarasi G Syncfusion Team June 27, 2008 11:15 AM UTC

Hi Jaime,

Thank you for providing the file with code snippets.

I am able to reproduce the issue that you have mentioned. We suspect the issue - 'While viewing the spreadsheet which is created by XlSIO in Ms Excel does not allow to change the chart serie name' to be a defect and we have forwarded this to our development team for more analysis. We will update you once we get back from our development team.

Regards,
G.Yavana




YG Yavanaarasi G Syncfusion Team July 23, 2008 10:38 AM UTC

Hi Jaime,

Thank you for your patience.

On further analysis the issue mentioned here is not a defect. It is a feature that could have a range values for serie name. So we have logged a feature request regarding this issue. We will update you once the feature has been implemented.

Please let me know if you have any other concerns.

Regards,
G.Yavana



AD Administrator Syncfusion Team September 24, 2008 08:10 PM UTC

Hi !
I whish to know if this posibility is alredy impelemented at any of the available versions of the libraries.

Thanks



GM Geetha M Syncfusion Team September 29, 2008 11:45 AM UTC

Hi Alejandro,

I regret for the delay.

This feature is not yet implemented in Essential XlsIO. We will update you once it is available.

Regards,
Geetha


Loader.
Live Chat Icon For mobile
Up arrow icon