summaryrefslogtreecommitdiff
path: root/js/dojo/dojox/gauges/Range.js
blob: 741edcde45245f5eb5c01d5b17505fa15efad27d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
//>>built
define("dojox/gauges/Range", ["dojo/_base/declare","dijit/_Widget"], 
  function(declare, Widget) {

/*=====
	Widget = dijit._Widget;
=====*/	
	
return declare("dojox.gauges.Range", [Widget], {
	// summary:
	//		a range to be used in a _Gauge
	//
	// description:
	//		a range widget, which has given properties.  drawn by a _Gauge.
	//
	// example:
	//	|	<script type="text/javascript">
	//	|		require(["dojox/gauges/AnalogGauge"]);
	//	|	</script>
	//	|	...
	//	|	<div	dojoType="dojox.gauges.AnalogGauge"
	//	|			id="testGauge"
	//	|			width="300"
	//	|			height="200"
	//	|			cx=150
	//	|			cy=175
	//	|			radius=125
	//	|			image="gaugeOverlay.png"
	//	|			imageOverlay="false"
	//	|			imageWidth="280"
	//	|			imageHeight="155"
	//	|			imageX="12"
	//	|			imageY="38">
	//	|		<div	dojoType="dojox.gauges.Range"
	//	|				low=5
	//	|				high=10
	//	|				hover="5 - 10"
	//	|		></div>
	//	|		<div	dojoType="dojox.gauges.Range"
	//	|				low=10
	//	|				high=20
	//	|				hover="10 - 20"
	//	|		></div>
	//	|	</div>
	
	// low: Number
	// 		the low value of the range
	low: 0,
	
	// high: Number
	// 		the high value of the range
	high: 0,
	
	// hover: String
	// 		the text to put in the tooltip for the gauge
	hover: '',
	
	// color: Object
	// 		the color of the range.  This must be an object of one of two forms:
	// 		{'color': 'color-name'}
	// 		OR
	// 		(for a gradient:)
	// 		{'type': 'linear', 'colors': [{offset: 0, color:'#C0C0C0'}, {offset: 1, color: '#E0E0E0'}] }
	color: null,
	
	// size: Number
	// 		for a circular gauge (such as an AnalogGauge), this dictates the size of the arc
	size: 0,

	startup: function(){
		this.color = this.color ? ( this.color.color || this.color) : 'black';
	}
});
});