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
SetStyleToComponent()-Method not enforced / overwritten by (default) colors
SetStyleToComponent()-Method not enforced / overwritten by (default) colors
- Attachments
-
- Set_STY_CHART_STYLE_via_code.mrt
- (45.94 KiB) Downloaded 123 times
-
- colors.csv
- (34 Bytes) Downloaded 127 times
Last edited by edstyles on Thu Dec 07, 2023 6:13 am, edited 1 time in total.
-
- Posts: 6431
- Joined: Tue Mar 20, 2018 5:34 am
Re: SetStyleToComponent()-Method not enforced / overwritten by (default) colors
Hello,
Please send your mrt file.
Also, please try to use the newChart.Core.ApplyStyle(customStyle); method.
Thank you.
Please send your mrt file.
Also, please try to use the newChart.Core.ApplyStyle(customStyle); method.
Thank you.
Re: SetStyleToComponent()-Method not enforced / overwritten by (default) colors
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?
-
- Posts: 6431
- Joined: Tue Mar 20, 2018 5:34 am
Re: SetStyleToComponent()-Method not enforced / overwritten by (default) colors
Hello,
We couldn't reproduce the issue. How do you run your report?
Thank you.
We couldn't reproduce the issue. How do you run your report?
Thank you.
- Attachments
-
- photo_2023-12-07_12-08-14.jpg (82.58 KiB) Viewed 2685 times
-
- ChartStyle.zip
- (22.56 KiB) Downloaded 119 times
Re: SetStyleToComponent()-Method not enforced / overwritten by (default) colors
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?
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?
-
- Posts: 6431
- Joined: Tue Mar 20, 2018 5:34 am
Re: SetStyleToComponent()-Method not enforced / overwritten by (default) colors
Hello,
Please send your request to HiScout developers, we do not know how they use our components in this application.
Thank you.
Please send your request to HiScout developers, we do not know how they use our components in this application.
Thank you.