Package org.zkoss.chart
Class Global
- java.lang.Object
-
- org.zkoss.chart.Optionable
-
- org.zkoss.chart.Global
-
- All Implemented Interfaces:
Serializable
,OptionDataListener
,org.zkoss.json.JSONAware
public class Global extends Optionable
The Global object is global and it can't be set on each chart initiation. Instead, useCharts.setOptions(Options)
to set it before any chart is initiated.- Author:
- jumperchen
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class org.zkoss.chart.Optionable
NOT_NULL_VALUE, options
-
-
Constructor Summary
Constructors Constructor Description Global()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getCanvasToolsURL()
Returns the URL to the additional file to lazy load for Android 2.x devices.Number
getTimezoneOffset()
Returns the timezone offset in minutes.String
getVMLRadialGradientURL()
Returns the path to the pattern image required by VML browsers in order to draw radial gradients.boolean
isUseUTC()
Returns whether to use UTC time for axis scaling, tickmark placement and time display inCharts.setDateFormat(String, Number, boolean)
.void
setCanvasToolsURL(String canvasToolsURL)
Sets the URL to the additional file to lazy load for Android 2.x devices.void
setTimezoneOffset(Number timezoneOffset)
Sets the timezone offset in minutes.void
setUseUTC(boolean useUTC)
Sets whether to use UTC time for axis scaling, tickmark placement and time display inCharts.setDateFormat(String, Number, boolean)
.void
setVMLRadialGradientURL(String VMLRadialGradientURL)
Sets the path to the pattern image required by VML browsers in order to draw radial gradients.-
Methods inherited from class org.zkoss.chart.Optionable
addExtraAttr, addOptionDataListener, clearOptonDataListener, clone, containsKey, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, getAttr, getAttr, getClientState, getExtraAttr, merge, onChange, removeExtraAttr, removeKey, removeOptionDataListener, setAttr, setAttr, setAttr, setAttr, toJSONString, toString
-
-
-
-
Method Detail
-
setVMLRadialGradientURL
public void setVMLRadialGradientURL(String VMLRadialGradientURL)
Sets the path to the pattern image required by VML browsers in order to draw radial gradients.Defaults to "~./js/chart/ext/gfx/vml-radial-gradient.png"
- Parameters:
VMLRadialGradientURL
-
-
getVMLRadialGradientURL
public String getVMLRadialGradientURL()
Returns the path to the pattern image required by VML browsers in order to draw radial gradients.Defaults to "~./js/chart/ext/gfx/vml-radial-gradient.png"
-
setCanvasToolsURL
public void setCanvasToolsURL(String canvasToolsURL)
Sets the URL to the additional file to lazy load for Android 2.x devices. These devices don't support SVG, so we download a helper file that contains canvg, its dependecy rbcolor, and our own CanVG Renderer class. To avoid hotlinking to our site, you can install canvas-tools.js on your own server and change this option accordingly.Defaults to ~./js/chart/ext/modules/canvas-tools.js
- Parameters:
canvasToolsURL
-
-
getCanvasToolsURL
public String getCanvasToolsURL()
Returns the URL to the additional file to lazy load for Android 2.x devices. These devices don't support SVG, so we download a helper file that contains canvg, its dependecy rbcolor, and our own CanVG Renderer class. To avoid hotlinking to our site, you can install canvas-tools.js on your own server and change this option accordingly.Defaults to "~./js/chart/ext/modules/canvas-tools.js"
-
setTimezoneOffset
public void setTimezoneOffset(Number timezoneOffset)
Sets the timezone offset in minutes. Positive values are west, negative values are east of UTC, as in the ECMAScript getTimezoneOffset method. Use this to display UTC based data in a predefined time zone.Defaults to 0.
- Parameters:
timezoneOffset
-
-
getTimezoneOffset
public Number getTimezoneOffset()
Returns the timezone offset in minutes. Positive values are west, negative values are east of UTC, as in the ECMAScript getTimezoneOffset method. Use this to display UTC based data in a predefined time zone.Defaults to 0.
-
setUseUTC
public void setUseUTC(boolean useUTC)
Sets whether to use UTC time for axis scaling, tickmark placement and time display inCharts.setDateFormat(String, Number, boolean)
. Advantages of using UTC is that the time displays equally regardless of the user agent's time zone settings. Local time can be used when the data is loaded in real time or when correct Daylight Saving Time transitions are required.Defaults to true.
- Parameters:
useUTC
-
-
isUseUTC
public boolean isUseUTC()
Returns whether to use UTC time for axis scaling, tickmark placement and time display inCharts.setDateFormat(String, Number, boolean)
. Advantages of using UTC is that the time displays equally regardless of the user agent's time zone settings. Local time can be used when the data is loaded in real time or when correct Daylight Saving Time transitions are required.Defaults to true.
-
-