Name
|
Type
|
Default
|
animationDuration
|
Number
|
1000
|
Determines the animations duration in milliseconds. The value must be between 0 and 5000.
If it is outside of this range jqxChart will reset it to the default value of 1000.
Try it: animationDuration is set to 1000
|
borderLineColor
|
String
|
#888888
|
Sets the chart's border color.
Example:
// select the chart element and change the default border color.
$('#jqxChart').jqxChart({borderLineColor: 'Blue'});
// refresh the chart element
$('#jqxChart').jqxChart('refresh');
Try it: borderLineColor is set to 'blue'
|
borderLineWidth
|
Number
|
1
|
Sets the chart's border line width
Example:
$('#jqxChart').jqxChart({borderLineWidth: 1});
// refresh the chart element
$('#jqxChart').jqxChart('refresh');
Try it: borderLineWidth is set to 2
|
backgroundColor
|
String
|
White
|
Sets the chart's background color.
Example:
// select the chart element and change the default background color.
$('#jqxChart').jqxChart({backgroundColor: 'Gray'});
// refresh the chart element
$('#jqxChart').jqxChart('refresh');
Try it: backgroundColor is set to 'silver'
|
backgroundImage
|
String
|
''
|
Sets the chart's background image.
Example:
// select the chart element and set background image.
$('#jqxChart').jqxChart({backgroundImage: '../images/chart_background.jpg'});
// refresh the chart element
$('#jqxChart').jqxChart('refresh');
Try it: backgroundImage is set to a custom string
|
colorScheme
|
String
|
'scheme01'
|
Sets the chart's color pallete. jqxChart suppports 11 color schemes from 'scheme01'
to 'scheme11'.
Example:
$('#jqxChart').jqxChart({colorScheme: 'scheme06'});
$('#jqxChart').jqxChart('refresh');
Try it: colorScheme is set to 'scheme11'
|
crosshairsDashStyle
|
String
|
'2,2'
|
Gets or sets the dash style of the crosshairs lines. The style is a series of numbers indicating line length followed by space length.
Example:
$('#jqxChart').jqxChart('crosshairsDashStyle', '1,1'});
Try it: crosshairsDashStyle is set to '2,2'
|
crosshairsLineWidth
|
Number
|
1.0
|
Gets or sets the width of the crosshairs lines.
Example:
$('#jqxChart').jqxChart('crosshairsLineWidth', 2.0});
Try it: crosshairsLineWidth is set to 1.5
|
columnSeriesOverlap
|
Boolean
|
false
|
Enables or disables overlapping of the column series.
Example:
$('#jqxChart').jqxChart('columnSeriesOverlap', true});
|
crosshairsColor
|
String
|
#888888
|
Gets or sets the color of the crosshairs lines.
Example:
$('#jqxChart').jqxChart('crosshairsColor', '#AA55AA'});
Try it: crosshairsColor is set to '#888888'
|
draw
|
Function
|
null
|
Determines the drawing function of jqxChart.
When the property is set, you can override the jqxChart's drawing.
Example:
var chartSettings = {
title: "Map of the European Union",
description: "",
padding: { left: 10, top: 5, right: 10, bottom: 5 },
titlePadding: { left: 90, top: 0, right: 0, bottom: 10 },
source: dataAdapter
};
// custom drawing function after
chartSettings.draw = function (renderer, rect) {
var records = this.source.records;
var wScale = rect.width / 13000
var hScale = (rect.height) / 8500;
for (var i = 0; i < records.length; i++) {
var path = transformPath(records[i].path, wScale, hScale, 62, 22);
var pathElement = renderer.path(path, { stroke: 'black' });
if (records[i].eu == "true") {
renderer.attr(pathElement, { fill: 'blue' });
}
else
renderer.attr(pathElement, { fill: '#DEDEDE' });
}
}
Try it: draw is set to custom function
|
drawBefore
|
Function
|
null
|
function for custom drawing before the title and other chart elements
Example:
var chartSettings = {
title: "Map of the European Union",
description: "",
padding: { left: 10, top: 5, right: 10, bottom: 5 },
titlePadding: { left: 90, top: 0, right: 0, bottom: 10 },
source: dataAdapter
};
// function draw before the title and other chart elements
chartSettings.drawBefore = function (renderer, rect) {
renderer.rect(rect.x, rect.y, rect.width, rect.height, { fill: 'lightblue' });
}
Try it: drawBefore is set to custom function
|
description
|
String
|
''
|
Sets the description text of the chart.
Example:
// select the chart element and change the description to 'New description'
$('#jqxChart').jqxChart({description: 'New description'});
// refresh the chart element
$('#jqxChart').jqxChart('refresh');
Try it: description is set to "Statistics for 2011"
|
enableCrosshairs
|
Boolean
|
false
|
Enables or disables the crosshairs lines. The lines are displayed in line and area series when you move over a data point.
Example:
$('#jqxChart').jqxChart(enableCrosshairs', false);
Try it: enableCrosshairs is set to true
|
enabled
|
Boolean
|
true
|
Gets or sets whether the chart widget in enabled or disabled state.
Example:
$('#jqxChart').jqxChart({enabled: false});
$('#jqxChart').jqxChart('refresh');
Try it: enabled is set to false
|
enableAnimations
|
Boolean
|
true
|
Determines if the animations are enabled. When you set this property it will turn on or off the animations
for all series in all seriesGroups in the chart. You can override this property for individual seriesGroups and series.
Try it: enableAnimations is set to true
|
enableAxisTextAnimation
|
Boolean
|
false
|
Determines if the animation of the axes text is enabled.
Try it: enableAxisTextAnimation is set to true
|
greyScale
|
Boolean
|
false
|
Determines whether to display the chart using grey scale colors.
Example:
$('#jqxChart').jqxChart({greyScale: true});
Try it: greyScale is set to true
|
legendLayout
|
Object
|
null
|
Sets the legend's layout. The expected object is with the following fields:
- left - legend's X position.
- top - legend's Y position.
- width - legend's width.
- height - legend's height.
- flow - 'horizontal' or 'vertical'.
Example:
Code example
$('#jqxChart').jqxChart({legendLayout : { left: 500, top: 140, width: 300, height: 200, flow: 'vertical' }});
Try it: legendLayout is set to { left: 535,top: 140,width: 200, height: 200, flow: 'vertical' }
|
localization
|
object
|
undefined
|
localization object containing culture specific properties required for formatting currencies, numbers and dates
Example:
$('#chartContainer').jqxChart({localization: getLocalization('de')});
|
padding
|
Padding
|
{ left: 5, top: 5, right: 5, bottom: 5 }
|
Sets the left,top, right & bottom padding of the Chart.
Example:
$('#jqxChart').jqxChart({padding: { left: 10, top: 10, right: 10, bottom: 10 }});
$('#jqxChart').jqxChart('refresh');
Try it: padding is set to {left: 20,top: 5, right: 20, bottom: 5 }
|
rtl
|
Boolean
|
false
|
Sets or gets a value indicating whether the Chart's layout is mirrored.
Example:
Code example
Set the rtl property.
$('#jqxChart').jqxChart({rtl : true});
Get the rtl property.
var rtl = $('#jqxChart').jqxChart('rtl');
Try it: rtl is set to true
|
renderEngine
|
String
|
''
|
Determines the rendering engine used to display the chart. Possible values are 'SVG', 'VML' and 'HTML5'.
When the property is not set jqxChart will automatically select an optimal rendering engine depending on the browser capabilities.
Example:
$('#jqxChart').jqxChart({renderEngine: 'HTML5'});
$('#jqxChart').jqxChart('refresh');
Try it: renderEngine is set to 'HTML5'
|
seriesGroups
|
Object
|
null
|
The seriesGroups property is used to describe all series displayed on the chart. jqxChart supports multiple
series of different types and series grouping. Each series group may have its own Value Axis (Y-axis) which
allows you to have values with different scales displayed on the same chart at the same time. It also allows
you to display multiple series types together on the same chart. For example, you can display all series in
one group as lines and the series in a second group as columns.
seriesGroups:
[
{
type: 'stackedarea100',
orientation: 'vertical',
series: [
{ dataField: 'SearchNonPaid', displayText: 'Non-Paid Search Traffic' },
{ dataField: 'SearchPaid', displayText: 'Paid Search Traffic' },
{ dataField: 'Referral', displayText: 'Referral Traffic' }
],
bands:
[
{ minValue: 2000, maxValue: 2500, color: '#FF0000', opacity: 0.15},
{ minValue: 1000, maxValue: 1100, color: '#FF0000', opacity: 0.20}
]
}
]
The seriesGroups is an array of objects where each object represents one group. A group may have the following properties:
Try it: seriesGroups is set to a custom object
|
source
|
Object
|
null
|
Sets the chart's data source.
Example:
var source =
{
datatype: "tab",
datafields: [
{ name: 'Date'},
{ name: 'Referral'},
{ name: 'SearchPaid'},
{ name: 'SearchNonPaid'}
],
url: '../sampledata/website_analytics.txt'
};
var dataAdapter = new $.jqx.dataAdapter(source,
{
async: false,
autoBind: true,
});
// prepare jqxChart settings
var settings = {
title: "Visual Web Traffic Analysis",
description: "Unique site visitors in 2011",
source: dataAdapter,
xAxis:
{
dataField: 'Date',
unitInterval: Math.round(dataAdapter.records.length / 12),
gridLines: { visible: false }
},
colorScheme: 'scheme06',
seriesGroups:
[
{
type: 'stackedarea100',
valueAxis:
{
unitInterval: 500,
title: {text: 'Daily visitors'}
},
series: [
{ dataField: 'SearchNonPaid', displayText: 'Non-Paid Search Traffic' },
{ dataField: 'SearchPaid', displayText: 'Paid Search Traffic' },
{ dataField: 'Referral', displayText: 'Referral Traffic' }
]
}
]
};
// setup the chart
$('#jqxChart').jqxChart(settings);
Try it: source is set to sampleData
|
showBorderLine
|
Boolean
|
true
|
Determines whether to display the chart's border line
Example:
// hide the border line
$('#jqxChart').jqxChart({showBorderLine: 'false'});
// refresh the chart element
$('#jqxChart').jqxChart('refresh');
Try it: showBorderLine is set to false
|
showLegend
|
Boolean
|
false
|
Determines whether to show or hide the chart series legend.
Example:
// select the chart element and hides the legend
$('#jqxChart').jqxChart({showLegend: false});
// refresh the chart element
$('#jqxChart').jqxChart('refresh');
Try it: showLegend is set to true
|
showToolTips
|
Boolean
|
true
|
Enables or disables the chart tooltips.
Example:
$('#jqxChart').jqxChart({showToolTips: false});
$('#jqxChart').jqxChart('refresh');
Try it: showToolTips is set to false
|
title
|
String
|
''
|
Sets the title of the chart.
Example:
// select the chart element and change the title to 'New Title'
$('#jqxChart').jqxChart({title: 'New Title'});
// refresh the chart element
$('#jqxChart').jqxChart('refresh');
Try it: title is set to "Top 5 most populated countries"
|
titlePadding
|
Padding
|
{ left: 2, top: 2, right: 2, bottom: 2 }
|
Sets the padding of the chart's title.
Example:
$('#jqxChart').jqxChart({titlePadding: { left: 10, top: 10, right: 10, bottom: 10 }});
$('#jqxChart').jqxChart('refresh');
Try it: titlePadding is set to {left: 90,top: 0, right: 0, bottom: 10 }
|
toolTipShowDelay
|
Number
|
500
|
Determines the tooltips show delay in milliseconds. Values may range from 0 to 10000 [ms]
Example:
$('#jqxChart').jqxChart({toolTipShowDelay: 2000});
$('#jqxChart').jqxChart('refresh');
Try it: toolTipShowDelay is set to 1000
|
toolTipHideDelay
|
Number
|
4000
|
Determines the tooltips hide delay in milliseconds.
Example:
$('#jqxChart').jqxChart({toolTipHideDelay: 5000});
$('#jqxChart').jqxChart('refresh');
Try it: toolTipHideDelay is set to 1000
|
toolTipMoveDuration
|
Number
|
300
|
Determines the time in millisecond to move the tooltip between items.
Example:
$('#jqxChart').jqxChart({toolTipMoveDuration: 50});
$('#jqxChart').jqxChart('refresh');
|
toolTipFormatFunction
|
Function
|
undefined
|
User defined tooltips text formatting callback function.
Try it: toolTipFormatFunction is set to a custom function
|
valueAxis
|
Object
|
null
|
Example:
valueAxis:
{
title: {text: 'Values'},
unitInterval: 1,
minValue: 0,
maxValue: 100,
gridLines: {
visible: true,
step: 3,
color: '#888888'
}
}
valueAxis properties:
- visible - shows or hides the valueAxis.
- unitInterval - sets the interval between the units.
- minValue - sets the minimum value of the valueAxis.
- maxValue - sets the maximum value of the valueAxis.
- baselineValue - sets the baseline value for the axis.
- logarithmicScale - determines whether to use logarithmic scale. The default value is 'false'.
- logarithmicScaleBase - base for logarithmic scale. The default value is 10.
- formatSettings - settings used to format the displayed values along the axis.
- formatFunction - custom function to format the displayed values along the axis.
- flip - specifies whether the values are displayed in reverse order.
- position - sets the axis position. Possible values: "left" and "right".
- padding - object describing the padding of the axis
- left - left padding.
- right - right padding.
- axisSize - sets the size of the axis.
- customDraw - boolean determining whether to draw the axis or the user will use APIs to draw it. The default is false.
- title - object describing the title of the valueAxis
- visible - boolean determining the visibility of the title.
- text - text of the title.
- class - CSS class of the title text.
- horizontalAlignment - horizontal alignment.
- verticalAlignment - horizontal alignment.
- tickMarks - object describing the tick marks properties of the valueAxis
- visible - true/false/'custom' determining the visibility. When 'custom' is set, displays only custom values/offsets.
- step - interval steps between tick mark placements.
- dashStyle - tick marks dash style, e.g. '2,2',
- lineWidth - line width in pixels of the tick marks.
- size - size in pixels of the tick marks. The default is 4.
- color - color of the tick marks, e.g. '#757575'.
- custom – an array of custom values/offsets where a label/tickmark/gridline will be displayed.
- gridLines - object describing the grid lines properties of the valueAxis
- visible - true/false/'custom' determining the visibility. When 'custom' is set, displays only custom values/offsets.
- step - interval steps between grid line placements.
- dashStyle - grid lines dash style, e.g. '2,2',
- lineWidth - line width in pixels of the grid lines.
- color - color of the tick marks, e.g. '#757575'.
- custom – an array of custom values/offsets where a label/tickmark/gridline will be displayed.
- line - object describing the line properties of the axis
- visible - boolean determining the visibility of the axis line.
- dashStyle - line dash style, e.g. '2,2'. The default is inherited from the grid lines.
- lineWidth - line width. The default is inherited from the grid lines.
- color - color of axis line, e.g. '#757575'.
- labels - object describing the labels properties of the axis
- visible - true/false/'custom' determining the visibility. When 'custom' is set, displays only custom values/offsets.
- step - interval steps between label placements.
- class - CSS class of the labels.
- angle - text rotation angle.
- textRotationPoint - position to rotate the text around, e.g. 'lefttop', 'centertop' or 'rightbottom'
- autoRotate - boolean determining if auto rotation is enabled. Applicable to polar and spider charts only.
- horizontalAligment - horizontal labels alignment.
- verticalAligment - vertical labels alignment.
- offset - labels offset, e.g {x: -5, y: 0}.
- formatSettings - object describing the format settings of the labels.
- formatFunction - callback function used to format the labels.
- custom – an array of custom values/offsets where a label/tickmark/gridline will be displayed.
- showGridLines - deprecated. (use the visible property of gridLines)
- gridLinesInterval - deprecated. (use the step property of gridLines)
- gridLinesColor - deprecated. (use the color property of gridLines)
- gridLinesDashStyle - deprecated. (use the dashStyle property of gridLines)
- showTickMarks - deprecated. (use the visible property of tickMarks)
- tickMarksInterval - deprecated. (use the step property of tickMarks)
- tickMarksColor - deprecated. (use the color property of tickMarks)
- tickMarksDashStyle - deprecated. (use the dashStyle property of tickMarks)
- alternatingBackgroundColor - alternating background color between grid lines
- alternatingBackgroundColor2 - second alternating background color
- alternatingBackgroundOpacity - opacity of the alternating background
- bands - optional color bands dislayed in the chart's plot area
- minValue - start value of the color band.
- maxValue - end value of the color band.
- color - color used to fill the area between the minValue and the maxValue.
- opacity - fraction indicating the fill opacity.
|
xAxis
|
Object
|
null
|
Sets the Chart's xAxis.
Example:
xAxis:
{
dataField: 'Date',
formatFunction: function (value) {
var months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
return months[value.getMonth()];
},
type: 'date',
baseUnit: 'month',
flip: false,
tickMarks: {
visible: true,
step: 1,
color: '#888888'
},
unitInterval: 1,
gridLines: {
visible: true,
step: 3,
color: '#888888'
}
}
- visible - shows or hides the xAxis axis.
- unitInterval - sets the interval between the units.
- dataField - points to a data field in the data source.
- type - the type of the axis. Values can be:
- 'default' - auto detects and switches to 'basic', 'linear' or 'date'
- 'date'- when displaying dates
- 'basic' - displays all data points sequencially
- 'linear' - linear arrangement by the value of the xAxis data field
- baseUnit - the base unit when used with 'date' axis. Values can be 'year', 'month', 'day', 'hour', 'minute', 'second' or 'millisecond'.
- valuesOnTicks - specifies whether the axis values will be aligned with the tick marks.
- dateFormat - optional date format for parsing the data from the data source. Applicable when type is set to 'date'.
- axisSize - sets the size of the xAxis.
- customDraw - boolean determining whether to draw the axis or the user will use APIs to draw it. The default is false.
- flip - specifies whether the axis is displayed in reverse order.
- position - sets the axis position. Possible values: "top" and "bottom".
- padding - object describing the padding of the axis
- top - top padding.
- bottom - bottom padding.
- title - object describing the title of the axis
- visible - boolean determining the visibility of the title.
- text - text of the title.
- class - CSS class of the title text.
- horizontalAlignment - horizontal alignment.
- verticalAlignment - horizontal alignment.
- tickMarks - object describing the tick marks properties of the axis
- visible - true/false/'custom' determining the visibility. When 'custom' is set, displays only custom values/offsets.
- step - interval steps between tick marks placements.
- dashStyle - tick marks dash style, e.g. '2,2',
- lineWidth - line width in pixels of the tick marks.
- size - size in pixels of the tick marks. The default is 4.
- color - color of the tick marks, e.g. '#757575'.
- custom – an array of custom values/offsets where a label/tickmark/gridline will be displayed.
- gridLines - object describing the grid lines properties of the axis
- visible - true/false/'custom' determining the visibility. When 'custom' is set, displays only custom values/offsets.
- step - interval steps between grid lines placements.
- dashStyle - grid lines dash style, e.g. '2,2',
- lineWidth - line width in pixels of the grid lines.
- color - color of the tick marks, e.g. '#757575'.
- custom – an array of custom values/offsets where a label/tickmark/gridline will be displayed.
- line - object describing the line properties of the axis
- visible - boolean determining the visibility of the axis line.
- dashStyle - line dash style, e.g. '2,2'. The default is inherited from the grid lines.
- lineWidth - line width. The default is inherited from the grid lines.
- color - color of axis line, e.g. '#757575'.
- labels - object describing the labels properties of the axis
- visible - true/false/'custom' determining the visibility of the axis labels. When 'custom' is set, displays only custom values/offsets.
- step - interval steps between label placements.
- class - CSS class of the labels.
- angle - text rotation angle.
- textRotationPoint - position to rotate the text around, e.g. 'lefttop', 'centertop' or 'rightbottom'
- autoRotate - boolean determining if auto rotation is enabled. Applicable to polar and spider charts only.
- horizontalAligment - horizontal labels alignment.
- verticalAligment - vertical labels alignment.
- offset - labels offset, e.g {x: -5, y: 0}.
- formatSettings - object describing the format settings of the labels.
- formatFunction - callback function used to format the labels.
- custom – an array of custom values/offsets where a label/tickmark/gridline will be displayed.
- logarithmicScale - determines whether to use logarithmic scale. The default value is 'false'.
- logarithmicScaleBase - base for logarithmic scale. The default value is 10.
- showGridLines - deprecated. (use the visible property of gridLines)
- gridLinesInterval - deprecated. (use the step property of gridLines)
- gridLinesColor - deprecated. (use the color property of gridLines)
- gridLinesDashStyle - deprecated. (use the dashStyle property of gridLines)
- showTickMarks - deprecated. (use the visible property of tickMarks)
- tickMarksInterval - deprecated. (use the step property of tickMarks)
- tickMarksColor - deprecated. (use the color property of tickMarks)
- tickMarksDashStyle - deprecated. (use the dashStyle property of tickMarks)
- alternatingBackgroundColor - alternating background color between grid lines
- alternatingBackgroundColor2 - second alternating background color
- alternatingBackgroundOpacity - opacity of the alternating background
- formatSettings - settings used to format the displayed values.
- formatFunction - custom function to format the displayed values.
- toolTipFormatSettings - settings used to format xAxis values in tooltips.
- toolTipFormatFunction - custom function to format xAxis values in tooltips.
- rangeSelector - definition of a range selector on the xAxis.
Try it: xAxis is set to a custom object
|