MindFusion.Charting for JavaScript Programmer's Guide
Unit.percentage Method
See Also
Collapse All Expand All Language Filter: All Language Filter: Multiple Language Filter: None Language Filter: C# Language Filter: Visual Basic Language Filter: Java Language Filter: JavaScript Language Filter: C++ Language Filter: XAML

C#
Visual Basic
Java
JavaScript
C++
XAML

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