MarkerStyle with Charts

Questions and answers on how to use XLSReadWriteII 3/4/5.
Post Reply
Matthias
Posts: 1
Joined: Tue Nov 28, 2006 1:22 pm

MarkerStyle with Charts

Post by Matthias »

Hi,

i'm testing XLSReadWriteII for .NET. Hope that i post to the right board.
I have 2 problems. The first concerns the Markerstyles, while removing them for 3 Series. Here is my code:

Code: Select all

 Chart = XLS.Sheets[2].AddChart();
            Chart.Col1 = 1;
            Chart.Col2 = 23;
            Chart.Row1 = 1;
            Chart.Row2 = 50;
            Chart.Series[0].Values = "Resultierender_Lastgang!$C$4:$C$22463";
            Chart.Series[0].HasDefDataPoint = true;
            Chart.Series[0].DefDataPoint.MarkerFormat.MarkerStyle = TChartMarkerStyle.cmsNone;

            Chart.Series.Add();
            Chart.Series[1].Values = "Resultierender_Lastgang!$D$4:$D$20351";
            Chart.Series[1].HasDefDataPoint = true;
            Chart.Series[1].DefDataPoint.MarkerFormat.MarkerStyle = TChartMarkerStyle.cmsNone;

            Chart.Series.Add();
            Chart.Series[2].Values = "Resultierender_Lastgang!$E$4:$E$22463";
            Chart.Series[2].HasDefDataPoint = true;
            Chart.Series[2].DefDataPoint.MarkerFormat.MarkerStyle = TChartMarkerStyle.cmsNone;
            
            Chart.Series[0].Category = "Resultierender_Lastgang!$A$4:$A$22175";
            Chart.Series[1].Category = "Resultierender_Lastgang!$A$4:$A$22175";
            Chart.Series[2].Category = "Resultierender_Lastgang!$A$4:$A$22175";
          
and so on....
 
As you could see I have 3 Series. Because i have to plot a lot of data (about 22.000 dataItems) it would be better to hide the Markers. So i set them to 'cmsNone'. But after generating and testing, in Excel only one Series has no marker, the other both series have still markers. What' wrong with my code? :?:

Second I would label the Series. So that there are pretty names within the legend. Which property may i have to use? Series[n].SerieName, didn't work, I got an exception while generating.

Many thx in advance.

Greets Matthias
Guest
Posts: 83
Joined: Tue Aug 16, 2005 6:08 pm

Post by Guest »

Hello Lars,

I also have a same problem, can you resolve this problem? thanks.
HarryBo
Posts: 2
Joined: Thu Jun 21, 2007 7:30 am

Post by HarryBo »

Hello,

you need to set the automatic-Property to false.
But it seems to get another problem - it only works with the first series!
I have the same problem, and I have it also with the lineformat... It only affects the first series, and the series always is black (but I set the linecolor to the previous value the linecolor has before settings automatic = false!)
Rasilon
Posts: 2
Joined: Thu Sep 04, 2008 1:09 am

Post by Rasilon »

Same problem here.. only the first series accepts the changes.

Is anyone getting a response to this question?
Post Reply