416.467.9100 | Dundas Data Visualization | Login
Welcome Guest
This is the support page for the legacy Dundas Dashboard application. For assistance with the current Dundas BI application please click here.
Dashboard v5.0

This site makes extensive use of JavaScript.

Please enable JavaScript in your web browser and reload the page before proceeding.

DashboardUnitLength Struct

Hide navigation
RSS
Modified on Tue, 29 May 2012 12:38 PM Categorized as Library Reference

DashboardUnitLength represents a unit value and associated unit.

Usage

The DashboardUnitLength structure has read-only properties, so if you have a control property of this type, you will not be able to change its individual properties directly in script. Instead, you must create a new instance of DashboardUnitLength and assign it to the control property that you want to change. To achieve this, you can use the static helper methods provided by DashboardUnitLength, or use the constructors of the structure.

Example script using the static helper methods:

// Set a margin of 10 pixels RadialGauge1.Scales[0].BarWidth = DashboardUnitLength.Pixel(10);

// Set a margin of 10% RadialGauge1.Scales[0].BarWidth = DashboardUnitLength.Percentage(0.1);


Example script using the constructor:

RadialGauge1.Scales[0].BarWidth = new DashboardUnitLength("Auto");

Properties

ImageImageProperty Name [Script Name]TypeDescription
Type [Type]DashboardUnitLengthTypeThe unit type for a unit length.
Value [Value]doubleThe unit length in terms of the specified unit type.

Methods

DashboardUnitLength provides the following constructors and static helper methods:

Constructors

  • DashboardUnitLength()
  • DashboardUnitLength(double pixels)
  • DashboardUnitLength(string value)

Arguments:
  • pixels - The number of pixels.
  • value - A text representation of the value, for example: "20" (pixels), "10%" or "Auto".

The parameterless constructor returns a unit length of Auto.

Pixel

Get the specified value as pixels.

  • static DashboardUnitLength Pixel(double pixels)

Arguments:
  • pixels - The number of pixels.

Percentage

Get the specified value as a percentage.

  • static DashboardUnitLength Percentage(double percentage)

Arguments:
  • percentage - The percentage.

Related topics

About Dundas | Contact Us Follow us on Twitter! | Privacy Statement | Report Site Issues

Copyright © 2009-2014 Dundas Data Visualization, Inc.