Skip to main content Skip to footer

How To Add Custom Rules to Chart Control

Background:

When designing a chart, you may want to create custom rules that will allow you to dynamically change the chart appearance including LineStyle, LineColor, BackgroundColor, etc.

Steps To Complete:

  1. In the Report Explorer navigate to the Plot - (PlotName) Item.
  2. Right Click and Select Properties.
  3. In the Properties Pane on the right locate Rules. This can be found under the Configuration tabs.
  4. Using the ellipsis will open the RuleDesigner Collection Editor.
  5. Using the Add button we can create a new Rule.
  6. We can then set the condition. If the condition is true, then the RulesPropety will change, if it is false it will keep the default settings.
  7. Next we can change the RuleProperties using the ellipsis. In here we will be able to change the TargePropety and the Value associated with it based upon whether the condition was met. EX: TargetPropety : LineStyle, Value: Dashed
  8. We can then click OK on both the RuleProperties and Rule.

In the Example Images below we will change the LineStyle based on whether the Chart Previous Value was Null.

Resources:

For more information on Charts use the following link: /activereportsnet/docs/latest/online/chart-page-rdl.html

For more information on Rules use the following link: /activereportsnet/docs/latest/online/rules-dvchart.html

Christian Pacelli

Technical Engagement Engineer