FusionCharts Suite XT allows you to draw the angular gauge from virtually any start angle to any end angle and in both directions.
In this section, you will be shown you can:
- Use the various
chartobject attributes to create angles
- Configure gauge angles to render angles of different shapes
- Position gauge origins automatically
- Set gauge origins manually
Using Chart Object Attributes to Create Gauges
The following attributes of the
chart object are the main control parameters that help to create charts of various angles and from various starting points:
||It is used to specify the angle at which the gauge will start drawing.This attribute takes values between - 360 and 360 with 180 as the default value.|
||It is used to specify the angle at which the gauge will finish drawing. This attribute takes values between -360 and 360 with 0 as the default value.|
||It is used to manually specify the x - coordinate at which the center of the gauge will be placed.This attribute is useful when you are designing small angle gauges or when you are using custom objects draw certain objects and need to set the exact center position.|
||It is used to manually specify the y-coordinate at which the center of the gauge will be placed. This attribute is useful when you are designing small angle gauges or when you are using custom objects draw certain objects and need to set the exact center position.|
||It is used to specify the outer radius,in pixels,for the color range scale.|
||It is used to specify the inner radius, in pixels, for the color range scale. This attribute can take two types of values: one as exact pixels and the second as a percentage of the outer radius (e.g. 75%).|
Understanding Angular Gauge Angles
The angular gauge comprehends angles as shown in the images below:
Each point in the circle can be represented by two angles - a positive angle and a negative angle.This enables you to plot bi - directional angular gauges.
An angular gauge flipped horizontally looks like this:
The data structure needed to render a horizontally flipped angular gauge is given below:
To flip the gauge, all you need to do is swap the default values of the
gaugeStartAngle and the
When specifying the start and end angles for gauges, you should always make sure that the difference between start and end angle should not be more than 360 degrees, else the gauge will not behave as intended.
Automatic Positioning of Gauge Origins
Based on the start and end angle measures of the gauge, the x and y center points (origins) of the gauge are automatically positioned.
Shown below are some examples that will help you understand how the origin points shift based on the angle measures.
An angular gauge with the start angle and end angle measuring 0° and 90° respectively looks like this:
The data structure needed to render the angular gauge with the start angle and end angle measuring 210° and - 30° is given below:
You can change the values of the
startAngle and the
endAngle attributes and see how the position of the origin
for each gauge changes depending on the combination of the start and end angle measures.
Manually Setting Gauge Origins
You can manually configure the gauge origins if the automatic adjustment of the origins based on the start and end angle measures does not meet your requirement. To manually set gauge origins, you will need to explicitly set your required values for the
An angular gauge rendered with manually-specified gauge origins looks like this:
The data structure needed to manually set the gauge origins is given below:
On the above example we have only modified the
gaugeOriginY attribute to shift the origin upward, you can do similar adjustments with
If you even dynamically resize this gauge now with proper configuration, as explained in Dynamically Resizing Gauges section, FusionCharts Suite XT will automatically resize the origin positions and radius specified.
There! You have now seen how you can configure the angles and origins for the angular gauge both, manually and automatically.