MindFusion.Charting for JavaScript Programmer's Guide
Unit.percentage Method
See Also
 






Creates a Unit instance with the specified value and UnitType.Percent.

Namespace: MindFusion.Common
File: Unit.js

 Syntax

JavaScript  Copy Code

function percentage (value)

 Parameters

value

Type: Number
Number. The value of the unit.

 Return Value

Type: Unit
Unit. The new Unit.

 Example

The following code uses the UnitType enumeration to check the type of a Unit value:

JavaScript  Copy Code

var m = MindFusion.Mapping;

var unit = new m.Unit();

if(unit.type == m.UnitType.Percent)
{
   var length = unit.value;
}

 See Also

Unit Members
Unit Class
MindFusion.Common Namespace