A Theme is a pre-defined object, primarily JSON-based, that makes up the definitions to style a chart. It extends SimpleTheme with additional features like color definition by palettes and gradients definition.
Parameter | Type | Description |
---|---|---|
kwArgs | undefined |
See the dojox/charting/Theme reference documentation for more information.
Add a custom marker to this theme.
Parameter | Type | Description |
---|---|---|
name | String | |
segment | String |
myTheme.addMarker("Ellipse", foo);
Add a mixin object to the passed theme and process.
Parameter | Type | Description |
---|---|---|
theme | dojox/charting/SimpleTheme | The theme to mixin to. |
elementType | String | The type of element in question. Can be "line", "bar" or "circle" |
mixin | Object | Array | The object or objects to mix into the theme. |
doPost | Boolean | If true, run the new theme through the post-processor. |
The new theme.
Clone the current theme.
The cloned theme; any alterations made will not affect the original.
Generate a set of colors for the theme based on keyword arguments.
Parameter | Type | Description |
---|---|---|
kwArgs | Object | The arguments object used to define colors. |
An array of colors for use in a theme.
var colors = Theme.defineColors({ base: "#369", generator: "compound" });
var colors = Theme.defineColors({ hue: 60, saturation: 90, low: 30, high: 80 });
Parameter | Type | Description |
---|---|---|
fillPattern | undefined | |
colorFrom | undefined | |
colorTo | undefined |
Parameter | Type | Description |
---|---|---|
color | undefined | |
luminance | undefined |
Parameter | Type | Description |
---|---|---|
color | undefined | |
fillPattern | undefined | |
lumFrom | undefined | |
lumTo | undefined |
Calculates and merges tick parameters.
Parameter | Type | Description |
---|---|---|
name | String | Tick name, can be "major", "minor", or "micro". |
mixin | Object |
Optional Optional object to mix in to the tick. |
Get the next color or series theme.
Parameter | Type | Description |
---|---|---|
elementType | String |
Optional An optional element type (for use with series themes) |
mixin | Object |
Optional An optional object to mix into the theme. |
doPost | Boolean |
Optional A flag to post-process the results. |
An object of the structure { series, marker, symbol }
Process any post-shape fills.
Parameter | Type | Description |
---|---|---|
theme | dojox/charting/SimpleTheme | The theme to post process with. |
elementType | String | The type of element being filled. Can be "bar" or "circle". |
The post-processed theme.
Set all the markers of this theme at once. obj should be a dictionary of keys and path segments.
Parameter | Type | Description |
---|---|---|
obj | Object |
myTheme.setMarkers({ "CIRCLE": foo });