SetStyleToComponent()-Method not enforced / overwritten by (default) colors

Stimulsoft Reports.NET discussion
Post Reply
edstyles
Posts: 3
Joined: Tue Dec 05, 2023 12:54 pm

SetStyleToComponent()-Method not enforced / overwritten by (default) colors

Post by edstyles »

I am looking for a way to set the style colors of a chart component in a report dynamically via code.

My minimal working example (see 'Variant 1 (preferred variant) 'StiChartStyle' of chart set via event/code) on Page 1 in the attached mrt-file) works in the editor Stimulsoft Reports (2021.4.4 from 19.11.2021, WPF v1, .NET 4.8, 2003-2023 ©Stimulsoft).
However, when the report based on this mrt-file is generated in the source application, some default colors are shown (not the default colors of the report file). All dll-files in the source application have the same version 2021.4.4.0, except 'Stimulsoft.Svg.dll' (2021.4.3.0).
Could you help me by telling me how to enforce ".SetStyleToComponent(Chart0)" in line 875 of the mrt-file in a generated report?

If this is not possible, could you give me a hint on how to set the style colors via 'Variant 3 / Code-generated data and assign 'AutoSeriesColorDataColumn' via event/code) on Page 1 or any other simple way to do this code-only?

Regards,
Ed
Attachments
Set_STY_CHART_STYLE_via_code.mrt
(45.94 KiB) Downloaded 92 times
colors.csv
(34 Bytes) Downloaded 92 times
Last edited by edstyles on Thu Dec 07, 2023 6:13 am, edited 1 time in total.
Lech Kulikowski
Posts: 6302
Joined: Tue Mar 20, 2018 5:34 am

Re: SetStyleToComponent()-Method not enforced / overwritten by (default) colors

Post by Lech Kulikowski »

Hello,

Please send your mrt file.

Also, please try to use the newChart.Core.ApplyStyle(customStyle); method.

Thank you.
edstyles
Posts: 3
Joined: Tue Dec 05, 2023 12:54 pm

Re: SetStyleToComponent()-Method not enforced / overwritten by (default) colors

Post by edstyles »

The mrt file is now attached to the original post. Could you be so kind and show how the newChart.Core.ApplyStyle(customStyle); method is used?
Lech Kulikowski
Posts: 6302
Joined: Tue Mar 20, 2018 5:34 am

Re: SetStyleToComponent()-Method not enforced / overwritten by (default) colors

Post by Lech Kulikowski »

Hello,

We couldn't reproduce the issue. How do you run your report?

Thank you.
Attachments
photo_2023-12-07_12-08-14.jpg
photo_2023-12-07_12-08-14.jpg (82.58 KiB) Viewed 2650 times
ChartStyle.zip
(22.56 KiB) Downloaded 87 times
edstyles
Posts: 3
Joined: Tue Dec 05, 2023 12:54 pm

Re: SetStyleToComponent()-Method not enforced / overwritten by (default) colors

Post by edstyles »

Run locally on a W10 notebook in Stimulsoft Reports editor (2021.4.4 from 19.11.2021, WPF v1, .NET 4.8, 2003-2023 ©Stimulsoft), I also do not get an issue.

When the mrt file is uploaded to the web application HiScout 3.11.1.0 and run within the product, the SetStyleToComponent()-Method is not enforced and only default colors are shown. The integration of Stimulsoft Reports is done via dll files (https://www.hiscout.com/erweiterungen/docgen/, german only).

Is Variant 3 outlined on page 1 of the report another way to achieve this?
- Code-generated data and assign 'AutoSeriesColorDataColumn' via event/code
- Can this be done using business objects(?) (https://www.stimulsoft.com/en/samples/r ... the-report)?

Or is there yet another variant to get the result of Variant 1 that is code-only?
Lech Kulikowski
Posts: 6302
Joined: Tue Mar 20, 2018 5:34 am

Re: SetStyleToComponent()-Method not enforced / overwritten by (default) colors

Post by Lech Kulikowski »

Hello,

Please send your request to HiScout developers, we do not know how they use our components in this application.

Thank you.
Post Reply