Servis-Rhino 4211B Uživatelská příručka Strana 216

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 298
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 215
Another, perhaps simpler solution is to hide the scrollbars with the style:
overflow-x: hidden; overflow-y: hidden;
It is possible to remove the default "leading" section from a Horizontal or Vertical gauge
using the following recipes:
gauge.removeElement("indicatorText");
gauge.removeElement("indicatorTextBorder");
Not all default gauges behave quite the same.
Scale font size:
Horizontal – gauge → font.size
SemiCircular – gauge scale element → font.size
See also:
Dojo Reference – dojox/dgauges – 1.9
Demos of the dojox/dgauges
developerWorks - Creating Bullet Graphs in Dojo with the gauges package – 2012-08-23
Creating custom gauges
The Dojo supplied gauges are good but we can go much further. We can create our own styles of
gauges. To do this, we must first look at two base classes called "CircularGauge" and
"RectangularGauge". Each gauge is composed of a series of parts that need to be explored.
These include:
GFX decorations
Text indicators
Scales
Scales hold value or range indicators that can be added to the scale using the addElement() method.
A scale object is responsible for drawing tick marks and labels. It has two functions on it that are
called to draw the appropriate items:
scale.tickShapeFunc = function(group, scale, tick) {…}
scale.tickLabelFunc = function(tick) {…}
Associated with a gauge are value and range indicators. A value indicator is responsible for
showing a marker in the gauge. Think of it as needle in a circular gauge or the thumb in a
rectangular gauge. A range indicator is used to show a "range".
The above range was added with:
var ri = new CircularRangeIndicator();
Page 216
Zobrazit stránku 215
1 2 ... 211 212 213 214 215 216 217 218 219 220 221 ... 297 298

Komentáře k této Příručce

Žádné komentáře