Pie Chart Styling

Stimulsoft Reports.WEB discussion
Post Reply
Christopher Lloyd
Posts: 23
Joined: Wed Apr 13, 2011 7:37 am
Location: UK

Pie Chart Styling

Post by Christopher Lloyd »

Hi,

I am having trouble styling my pie charts.

I am using the windows designer to create my report template which then gets loaded by a .NET web page (webviewer fx) and the data gets fed into it at run time (using RegData). The report and data works perfectly, the problem is that my pie chart ignores the custom style I have given it and seems to default to "Style01" colours.

To create my style I used the style designer, create a new chart style, set the colour array then save it. Then click on the chart and set the style to my custom style. I have tried setting "Allow Apply Style" to true and false but it still doesnt work on either.

The legend and the labels seem to pick up the styling but the actual pie sections default to Style01 colour scheme.

Am I missing a setting?

Thanks for any help,

Chris

Ivan
Posts: 960
Joined: Thu Aug 10, 2006 1:37 am

Pie Chart Styling

Post by Ivan »

Hello,

Can you please send us a sample report template with data, which reproduce the issue?

Thank you.
Christopher Lloyd
Posts: 23
Joined: Wed Apr 13, 2011 7:37 am
Location: UK

Pie Chart Styling

Post by Christopher Lloyd »

Hi,

Thanks for your reply.

I am not able to supply the actual code but I have managed to create a basic example.

Steps >
- Create new report
- Create a new datasource and select datatable / dataset
- Enter a name for datatable
- Create 3 columns, 2 string ones and a decimal one
- Add a pie chart to the report
- Set the argument column to one of the string columns in the datatable
- Set the value column to the decimal column in the datatable
- Select the pie chart object
- Select Style Designer
- Create style from selected component
- Change the colour array to new colours (I chose a grey scale)
- Select the pie chart again
- Choose the style option in the Chart properties and select the newly created style (which appears first)

I now have a chart which uses an empty datatable as its data source. I use .NET to populate this datatable.

I have an ASPX page which has this code

StiReport report = new StiReport();
report.Load("CHARTPATH.mrt");

I then do this to put the data into the chart -

report.RegData("DATATABLENAME", DATATABLE);

The DATATABLE is brought from our database via our DA layer.

Finally I use the webviewer fx to load the report
StiWebViewerFx swv = new StiWebViewerFx();
swv.Report = report;
PlaceHolder.Controls.Add(swv);

The data presents perfectly in the graph but it completely ignores the style I set.

The interesting part is - if I comment out the "RegData" line I get no data (obviously) but I get a basic chart WITH the correct new style

Is there something that the regdata statement triggers that resets the styling of the chart? Do I need to reset the selected style in code after regdata is ran?

Thanks,
Chris
Christopher Lloyd
Posts: 23
Joined: Wed Apr 13, 2011 7:37 am
Location: UK

Pie Chart Styling

Post by Christopher Lloyd »

Forgot to mention -

I use the "List of Arguments" and "List of Values" properties in the chart design to get the graph working when RegData is commented out

Thanks,
Chris
Andrew
Posts: 4108
Joined: Fri Jun 09, 2006 3:58 am

Pie Chart Styling

Post by Andrew »

Hello,

The error is reproduced. We are working on it.

Thank you.
Jan
Posts: 1265
Joined: Thu Feb 19, 2009 8:19 am

Pie Chart Styling

Post by Jan »

Hello,

Problem solved. Patch will be available in next prerelease build.

Thank you.
Christopher Lloyd
Posts: 23
Joined: Wed Apr 13, 2011 7:37 am
Location: UK

Pie Chart Styling

Post by Christopher Lloyd »

Thank you
Andrew
Posts: 4108
Joined: Fri Jun 09, 2006 3:58 am

Pie Chart Styling

Post by Andrew »

Hello,

Let us know if you have additional questions.

Thank you.
Post Reply