|
Name
|
Type
|
Default
|
|
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');
|
|
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');
|
|
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');
|
|
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');
|
|
borderLineWidth
|
Number
|
1
|
Sets the chart's border line width
Example:
$('#jqxChart').jqxChart({borderLineWidth: 1});
// refresh the chart element
$('#jqxChart').jqxChart('refresh');
|
|
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');
|
|
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');
|
|
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');
|
|
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' }});
|
|
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');
|
|
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');
|
|
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');
|
|
greyScale
|
Boolean
|
false
|
Determines whether to display the chart using grey scale colors.
Example:
$('#jqxChart').jqxChart({greyScale: true});
|
|
showToolTips
|
Boolean
|
true
|
Enables or disables the chart tooltips.
Example:
$('#jqxChart').jqxChart({showToolTips: false});
$('#jqxChart').jqxChart('refresh');
|
|
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');
|
|
toolTipHideDelay
|
Number
|
4000
|
Determines the tooltips hide delay in milliseconds.
Example:
$('#jqxChart').jqxChart({toolTipHideDelay: 5000});
$('#jqxChart').jqxChart('refresh');
|
|
toolTipFormatFunction
|
Function
|
undefined
|
User defined tooltips text formatting callback function.
|
|
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');
|
|
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);
|
|
crosshairsColor
|
String
|
#888888
|
Gets or sets the color of the crosshairs lines.
Example:
$('#jqxChart').jqxChart('crosshairsColor', '#AA55AA'});
|
|
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'});
|
|
crosshairsLineWidth
|
Number
|
1.0
|
Gets or sets the width of the crosshairs lines.
Example:
$('#jqxChart').jqxChart('crosshairsLineWidth', 2.0});
|
|
enabled
|
Boolean
|
true
|
Gets or sets whether the chart widget in enabled or disabled state.
Example:
$('#jqxChart').jqxChart({enabled: false});
$('#jqxChart').jqxChart('refresh');
|
|
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,
categoryAxis:
{
dataField: 'Date',
unitInterval: Math.round(dataAdapter.records.length / 12),
showGridLines: false
},
colorScheme: 'scheme06',
seriesGroups:
[
{
type: 'stackedarea100',
valueAxis:
{
unitInterval: 500,
description: '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);
|
|
categoryAxis
|
Object
|
null
|
Sets the Chart's categoryAxis.
Example:
categoryAxis:
{
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,
showTickMarks: true,
tickMarksInterval: 1,
tickMarksColor: '#888888',
unitInterval: 2,
showGridLines: true,
gridLinesInterval: 3,
gridLinesColor: '#888888'
}
- dataField - points to a data field in the data source.
- type - the type of the axis. Values can be 'default' or 'date' when displaying dates.
- unitInterval - sets the interval between the units.
- 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.
- showTickMarks - when this property is true, the ticks are displayed in the categoryAxis.
- tickMarksInterval - sets the interval between each tick mark.
- tickMarksColor - sets the color of the tick marks.
- tickMarksDashStyle - a string sequence of numbers represening line and space lengths, e.g. '2,2'
- showGridLines - displays the grid lines.
- gridLinesInterval - sets the interval between the grid lines.
- gridLinesColor - set the grid lines color.
- gridLinesDashStyle - a string sequence of numbers represening line and space lengths, e.g. '2,2'
- axisSize - sets the size of the categoryAxis.
- formatSettings - settings used to format the displayed values.
- formatFunction - custom function to format the displayed values.
- toolTipFormatSettings - settings used to format category axis values in tooltips.
- toolTipFormatFunction - custom function to format category axis values in tooltips.
- textRotationAngle - rotation of the text along the axis (0-360) degrees.
- textRotationPoint - position to rotate the text around, e.g. 'left', 'center' or 'right'
- textOffset - horizontal and vertical text position offset, e.g. {x: 5, y: 2}
- horizontalTextAlignment - horizontal alignment for the values along the axis.
- verticalTextAlignment - vertical alignment for the values along the axis.
- horizontalDescriptionAlignment - horizontal alignment for the axis description text
- verticalDescriptionAlignment - vertical alignment for the axis description text.
|
|
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',
valueAxis:
{
unitInterval: 500,
flip: false,
minValue: 0,
maxValue: 3000,
displayValueAxis: true,
description: 'Daily visitors',
axisSize: 'auto',
tickMarksColor: '#888888'
},
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:
|
|
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.
|
|
enableAxisTextAnimation
|
Boolean
|
false
|
Determines if the animation of the axes text is enabled.
|
|
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.
|
|
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');
|