Video: Report Designer - Colouring Points In Charts Using Scripts
This video demonstrates how to use Scripts within the Report Designer to colour data points in Charts based on the value of the data point. The script used within this demonstration is provided below the video.
Demonstration Script
To insert the below script into the chart control for your report, perform the following steps:
- With your report open in the Report Designer, click on Scripts in the the Report Ribbon.
- Select your chart from the Control drop-down list (by default, the first chart created is named chart1).
- Select Custom Draw a Series Point as the Event type, the Event is created in the script window.
- Copy and paste the below script into the Script window.
- Click on the Validate button in the Script window to check and verify the script.
- Click on the Preview button in the Report Ribbon to review the report, showing the points highlighted.
double currentValue = e.SeriesPoint.Values[0];
if( currentValue < 9)
{
PointDrawOptions line = e.SeriesDrawOptions as PointDrawOptions ;
line.Color = System.Drawing.Color.Green;
}
else
{
Point.DrawOptions line = e.SeriesDrawOptions as PointDrawOptions ;
line.Color = System.Drawing.Color.Orange;
}
Related Articles
Report Designer
Using Report Designer you can create your own report templates and use them in DataSight. Within Report Designer you define the data to use for a report using a Query Builder, add data regions to the report design surface, link the data and data ...
Video: Report Designer - Group Chart by Headers
This video demonstrates how to group Charts within Report Designer by Headers, such as Level Name.
Video: Report Designer - Changing Date and Time Formats for Chart Axis
This video demonstrates ways in which you can change the date and time formats shown on Charts using the Report Designer.
Report Designer User Interface
The documents in this section are dedicated to the elements of the Report Designer User Interface. Section Element Description Main Surface Design Panel A surface where a report layout is displayed and edited. Functionality Context Menu Right click ...
Report Designer Settings
This document details settings that affect the entire report. A Report is the main object in the Report Designer, as it's the document being edited. While the main report's properties can be accessed via the report's Smart Tag, the complete settings ...