Page 1 of 2

Chart / Pie Chart Styling

Posted: Wed Jul 06, 2011 11:28 am
by Christopher Lloyd
Hi,

I am trying to alter the style of the chart after a style has been set eg style03.

I want to change the labels. I have it set to two column series labels and want to remove the border and background colour of the labels. I also want to remove the background colour and border of the chart area.

Here is the code I use but it seems to be ignored -

Code: Select all

theChart.Area = new StiPieArea();
                            theChart.Area.BorderColor = System.Drawing.Color.Transparent;
                            theChart.Area.Brush = new Stimulsoft.Base.Drawing.StiEmptyBrush();
                            theChart.Border = new Stimulsoft.Base.Drawing.StiBorder(Stimulsoft.Base.Drawing.StiBorderSides.None, System.Drawing.Color.Transparent, 0, Stimulsoft.Base.Drawing.StiPenStyle.None);
                            theChart.Brush = new Stimulsoft.Base.Drawing.StiEmptyBrush();
                            // set a series
                            StiSeries thePieSeries = new StiPieSeries();
                            thePieSeries.SeriesLabels = new Stimulsoft.Report.Chart.StiTwoColumnsPieLabels();
                            thePieSeries.SeriesLabels.BorderColor = System.Drawing.Color.Transparent;
                            thePieSeries.SeriesLabels.Brush = new Stimulsoft.Base.Drawing.StiEmptyBrush();
                            thePieSeries.SeriesLabels.LabelColor = System.Drawing.Color.FromArgb(255, 105, 105, 105);
                                                    
                            theChart.SeriesLabels = new Stimulsoft.Report.Chart.StiTwoColumnsPieLabels();
                            theChart.SeriesLabels.BorderColor = System.Drawing.Color.Transparent;
                            theChart.SeriesLabels.Brush = new Stimulsoft.Base.Drawing.StiEmptyBrush();
                            theChart.SeriesLabels.LegendValueType = StiSeriesLabelsValueType.Argument;
                            theChart.SeriesLabels.ValueType = StiSeriesLabelsValueType.Argument;

                            theChart.Series.Add(thePieSeries);
The reason I set a new area and a new series in code is because the user can select between a pie chart and a column chart in our configuration screen.

Am I missing something or is the style (style03) supposed to override all of the above?

Thanks,
Chris

Chart / Pie Chart Styling

Posted: Thu Jul 07, 2011 8:38 am
by Vladimir
Hello,

Please try the following steps:
1. Set the AllowApplyStyle property to True
2. Apply a style03 to the Chart
3. Set the AllowApplyStyle property to False
4. Make the necessary changes

Thank you.

Chart / Pie Chart Styling

Posted: Thu Jul 07, 2011 9:16 am
by Christopher Lloyd
That worked!

Thanks very much

Chart / Pie Chart Styling

Posted: Thu Jul 07, 2011 9:18 am
by Christopher Lloyd
Another question....

Any tips on how to avoid overlaping series labels?

Thanks,
Chris

Chart / Pie Chart Styling

Posted: Fri Jul 08, 2011 5:27 am
by Alex K.
Hello,

You can use the PreventIntersection propertyes for Pie chart.

Thank you.

Chart / Pie Chart Styling

Posted: Tue Jul 12, 2011 11:17 am
by Christopher Lloyd
Hi,

Sounds perfect, I cant seem to find the property. Is it in the designer? Also where can I find it in the .NET code?

Thanks,
Chris Russell

Chart / Pie Chart Styling

Posted: Wed Jul 13, 2011 8:10 am
by Alex K.
Hello Chris,

Oh, sorry,I fogot to say that these properties are available only for "Two Columns" style of Series labels.

Thank you.

Chart / Pie Chart Styling

Posted: Thu Oct 27, 2011 9:33 am
by Christopher Lloyd
Hi,

I am using two column style labels but still cant find the property in the designer or the .NET code... Could you point me in the right direction?

Thanks,
Chris

Chart / Pie Chart Styling

Posted: Thu Oct 27, 2011 9:54 am
by Christopher Lloyd
I have found it in the .NET class. Doesnt seem to stop the overlapping though if there are a few small segments together

Is there a way the labels can be positioned further apart with the line linking them to the segment they represent?

Thanks,
Chris

Chart / Pie Chart Styling

Posted: Mon Oct 31, 2011 7:14 am
by HighAley
Hello, Chris.
crl18091980 wrote:I have found it in the .NET class. Doesnt seem to stop the overlapping though if there are a few small segments together

Is there a way the labels can be positioned further apart with the line linking them to the segment they represent?
Did you find the Prevent Intersection property?
Please, send us your report template with data to reproduce your issue.

Thank you.