Name: PieChart.sym and PieChartLegend.sym
Range (if applicable): Each segment (V to V) is 0 to the maximum tag value for the application. Color range values for all segments is 0 (black) to 16777215 (white) as described in the InduSoft Web Studio Technical Reference in the section “Color Interface”
Pie Chart: Ten pie-shaped segments, each can be a minimum of 1° to a maximum size of 360° with defined default colors as shown. Segment colors can be changed by adding the new color number to the Pie Chart “Properties” or by using a Tag value containing the desired color. The entire Pie Chart can be rotated, or it can be resized (default 100%) by hardcoding a new size into the Size Property, or by using a tag having values from 0 to 100%. Larger sizes can be used by modifying the symbol.
Pie Chart Legend: A chart showing the segment color, the value of the segment tag and the approximate percentage (rounded off) of the pie chart symbol that the segment occupies.
The Pie Chart Symbol was created using 360 identical and stacked 1° closed-polygon segments (see video) with a color and rotation animation added. The rotation animations are assigned a unique position on the circle (0 to 359) plus an offset tag which allows the starting point to be moved 360° around the circle. Each color animation in the segment uses the following single-line filter, substituting each segment’s degree number position for the word “Degree”:
The Pie Chart Legend Symbol was created by using rectangles and single-line number formatting constraints and will display up to four characters (e.g., 9999, 99.9, 9.99, or .999). Percentages are created by rounding to the nearest whole number. Default colors are defined, however like the Pie Chart Symbol, they can be changed in a similar manner.
The Pie Chart Application demonstrates how the symbols work and are shown in detail in the video.
- This symbol contains only native IWS objects.
- Due to the constraint of the Color Animation Expression Field, the filter text shown above is near the character maximum limit that can be put into the field. A tag array is recommended, with the tag name being 1-letter only using array values 0 through 9. Using a tag name such as “Value” instead of “V” overruns the field character limitation (actual tag names are substituted for the custom property when the application is compiled) and causes the symbol to fail without any warning. An overrun of the color animation field will cause the symbol to display in the native colors of the symbol as shown here:
Ideas for improvement:
- Floating Segment Percentages
- Add different sizes to the legend
- Change the segment colors
- Add the flexibility for other minimums and maximums
Here’s how to use this symbol:
Unzip and copy the .sym file into your Symbol folder of where InduSoft Web Studio is installed. This is usually “C:\Program Files (x86)\InduSoft Web Studio v7.1\Symbol” or similar. Either create a new folder or copy it into an existing one.