Dynamically set graph's bar series' ColorPalette

0 Answers 103 Views
Graph Rendering Report Designer (standalone) Report Viewer - HTML5
Chris
Top achievements
Rank 1
Chris asked on 24 May 2022, 07:03 AM | edited on 24 May 2022, 07:05 AM

I am using the Standalone Report Designer and I need to be able to set a graph's bar series' (for example) ColorPalette based on an external UserFunction in an assembly (dll) that is referenced in the config.

So far I was able to set this in the Bindings property for the graph itself:

However, I'm not sure if this is working as I expected since the graph's series does not change colors according to the UserFunction (I followed steps from this and this and this and this).

I would have thought a graph's Series > BarSeries1 would have a "Bindings" property, but it doesn't.

Inside the Series > BarSeries is the ColorPalette property, and initially I have manually added a bunch of colors.

However, there is no way here to set an expression to the "Colors" collection.

I would have thought the Bindings I set for the graph would flow into here, but I think it's only applicable to the Graph's colors -- the Series would be separate from it, thus no changes taking effect.

Is there any way to set a graph's bar series' ColorPalette to an expression?

Dimitar
Telerik team
commented on 26 May 2022, 03:04 PM

The ColorPalette colors, when set, will be applied over the barSeries' colors so the behavior that you have experienced is unexpected.

Try to reset the barSeries' ColorPalette. To do this, right-click on the barSeries5.ColorPalette property and choose Reset. The colors of the graph should now be getting applied.

If they do not, that could be an indication of there being a problem with the custom function or its assembly. Make sure that the assembly is built for .NET Standard 2.0/.NET Framework as the Standalone Report Designer cannot recognize assemblies that target .NET Core/5/6 and higher or .NET Standard 2.1 and higher.

In case you would need further assistance, please attach the report in the next reply alongside the custom function so that I may test it locally.

No answers yet. Maybe you can help?

Tags
Graph Rendering Report Designer (standalone) Report Viewer - HTML5
Asked by
Chris
Top achievements
Rank 1
Share this question
or