Properties

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.

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');

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');

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});

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'});

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' });
 }
}
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' });
}
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');

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);

enabled Boolean true

Gets or sets whether the chart widget in enabled or disabled state.

Example:

 $('#jqxChart').jqxChart({enabled: false});
 $('#jqxChart').jqxChart('refresh');

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.

greyScale Boolean false

Determines whether to display the chart using grey scale colors.

Example:
 
 $('#jqxChart').jqxChart({greyScale: 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' }}); 
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');

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'); 
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');
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:
  • type - sets the chart type. jqxChart supports several common chart types. You can easily plot series of different types on a common chart. A type must be specified for each series group. Currently jqxChart supports the following series types:
    • column - simple column series
    • stackedcolumn - stacked column series
    • stackedcolumn100 - percentage stacked columns
    • rangecolumn - floating column between two values
    • waterfall - waterfall series
    • stackedwaterfall - stacked waterfall series
    • line - simple streight lines connecting the value points
    • stackedline - stacked lines
    • stackedline100 - percentage stacked lines
    • spline - smooth lines connecting the value points
    • stackedspline - smooth stacked lines
    • stackedspline100 - percentage stacked smooth lines
    • stepline - step line
    • stackedstepline - stacked step line
    • stackedstepline100 - percentage stacked step line
    • area - area connecting the value points with streight lines
    • stackedarea- stacked area with streight lines between the points
    • rangearea - floating area between pairs of value points
    • stackedline100 - percentage stacked area
    • splinearea - smooth area connecting the value points
    • splinerangearea - smooth floating area between pairs of value points
    • stackedsplineara - smooth stacked area
    • stackedsplinearea100 - percentage stacked smooth area
    • steplinearea - step area connecting the value points
    • stackedsteplineara - step stacked area
    • stackedsteplinearea100 - percentage stacked step area
    • pie - circular chart divided into sectors, illustrating proportion
    • donut - chart divided into circular sectors with different inner and outer radius
    • scatter - data is displayed as a collection of points
    • stackedscatter - data is displayed as a collection of points and the values are stacked
    • stackedscatter100 - data is displayed as a collection of points and the values are percentage stacked
    • bubble - data is displayed as a collection of bubbles
    • stackedbubble - data is displayed as a collection of bubbles and the values are stacked
    • stackedbubble100 - data is displayed as a collection of bubbles and the values are percentage stacked
    • candlestick - display candlestick series using open, high, low, close data points
    • ohlc - display OHLC series using open, high, low, close data points
  • orientation - specifies the orientation of the series group.
    • vertical - the valueAxis is displayed vertically and the xAxis horizontally.
    • horizontal - the valueAxis is displayed horizontally and the xAxis vertically
  • valueAxis - object describing the valueAxis for this group. jqxChart allows you to use a common valueAxis and/or multiple value axes per serie group.
  • columnsGapPercent - percentage gap between columns within the same serie. The default value is 25.
  • seriesGapPercent - percentage gap between columns belonging to different series. The default value is 10.
  • columnsMaxWidth - maximum width of columns in column series.
  • columnsMinWidth - minimum width of columns in column series.
  • columnsTopWidthPercent - columns top width (as percentage of the total width). The default value is 100.
  • columnsBottomWidthPercent - columns bottom width (as percentage of the total width). The default value is 100.
  • skipOverlappingPoints - determines whether to display overlapping data points in column, ohlc and candlestick series. The default value is true.
  • polar - a boolean value. When polar is set to 'true' the chart will render in polar coordinates.
  • spider - a boolean value. When spider is set to 'true' the chart will render in polar coordinates.
  • radius - the radius of the polar coordinate system. Applicable to polar and spider charts only.
  • startAngle - the start angle (in degrees) of the polar coordinate system. Applicable to polar and spider charts only.
  • endAngle - the end angle (in degrees) of the polar coordinate system. Applicable to polar and spider charts only.
  • offsetX - horizontal position of the center of the polar coordinate system. Applicable to polar and spider charts only.
  • offsetY - vertical position of the center of the polar coordinate system. Applicable to polar and spider charts only.
  • series - an array of chart series.

    Each serie has the following properties:

    • dataField - name of the field in the data source.
    • displayText - name to display for this serie.
    • dataFieldOpen, dataFieldHigh, dataFieldLow, dataFieldClose - names of the fields in the data source used in candlestcik and ohlc series
    • displayTextOpen, displayTextHigh, displayTextLow, displayTextClose - names to display for candlestick and ohlc series.
    • colorScheme - color palette to use when rendering the serie.
    • color - (Deprecated) fill color for the serie.
    • lineColor - Line color for the serie.
    • lineColorSelected - Line color for the serie when selected.
    • fillColor - Fill color for the serie.
    • fillColorSelected - Fill color for the serie when selected.
    • fillColorAlt - Alternating fill color for the serie. Applicable to OHLC series only.
    • fillColorAltSelected - Alternating fill color for the serie when selected. Applicable to OHLC series only.
    • lineColorSymbol - Line color for the marker symbols in serie.
    • lineColorSymbolSelected - Line color for the marker symbols in the serie when selected.
    • fillColorSymbol - Fill color for the marker symbols in the serie.
    • fillColorSymbolSelected - Fill color for the the marker symbols in serie when selected.
    • colorFunction - a custom function that returns the color of a data point.
      The function will received the following parameters: dataValue, itemIndex, serie, group
      The implementation of the function can return a single color which will be used as a fillColor and
      the other colors will be derived or it can return an object containing fillColor, fillColorSelected, etc.
    • greyScale - boolean that determines whether to display the serie in grey scale.
    • legendFormatSettings - legend data formatting settings for the values in the serie.
    • legendFormatFunction - legend data formatting function for the values in the serie.
    • legendFillColor - fill color of the legend box. The default value is inherited by the serie's color.
    • legendLineColor - line color of the legend box. The default value is inherited by the serie's color.
    • toolTipFormatSettings - tooltip data formatting settings for the values in the serie.
    • toolTipFormatFunction - tooltip data formatting function for the values in the serie.
    • toolTipLineColor - determines the tooltip's border lines color.
    • toolTipBackground - determines the tooltip's background.
    • toolTipClass - determines the tooltip's CSS class name.
    • useGradient - determines whether to use color gradients.
    • opacity - determines the opacity of the items in this serie.
    • lineWidth - determines the line tickness of the items in this serie.
    • lineDashStyle - a string sequence of numbers represening line and space lengths, e.g. '2,2'
    • emptyPointsDisplay - determines how to display value gaps in line series. Possible values are: 'connect', 'skip' and 'zero'
    • linesUnselectMode - determines how line and area series are unselected based on mouse and touch events. Possible values are 'click' or 'default'. If the value is set to 'click', once a line or area serie is selected, it will remain selected until the user clicks or moves the cursor outside the chart. In default mode, the serie will be unselected immediatelly after the cursor moves over another serie or outside the chart.
    • symbolType - determines the symbol type displayed for the data points in the serie. This parameter is applicable to line, area, scatter and bubble series only. Acceptable values are: 'none', 'circle', 'square', 'diamond', 'triangle_up', 'triangle_down', 'triangle_left', 'triangle_right'
    • symbolSize - determines the size of the symbol element
    • symbolSizeSelected - determines the size of the symbol element. This paramters is applicable to line and area series only.
    • 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.
      • offset - labels offset, e.g {x: -5, y: 0}.
      • angle - text rotation angle.
      • horizontalAligment - horizontal labels alignment.
      • verticalAligment - vertical labels alignment.
      • class - CSS class of the labels.
      • backgroundColor - labels background color.
      • backgroundOpacity - labels background opacity.
      • borderColor - labels border line color.
      • borderOpacity - labels border line opacity.
      • padding - object describing the padding of the labels
        • left - left padding.
        • right - right padding.
        • top - top padding.
        • bottom - bottom padding.
      • autoRotate - boolean determining if auto rotation is enabled.
      • formatSettings - object describing the format settings of the labels.
      • formatFunction - callback function used to format the labels.
      • radius - radius of the labels in pie/donut series.
      • linesEnabled - determines whether to use lines for the labels in pie/donut series.
      • linesAngles - determines whether to use direct lines for the labels in pie/donut series.
      • custom – an array of custom values/offsets where a label/tickmark/gridline will be displayed.
    • radius - outer radius of pie and donut series in pixels or percents.
    • innerRadius - inner radius of donut series in pixels or percents.
    • selectedRadiusChange - radius change on selection of pie and donut series in pixels or percents.
    • initialAngle - initial angle in pie and donut series.
    • startAngle - minimum angle in a pie, donut, polar and spider series
    • endAngle - maximum angle in a pie, donut, polar and spider series
    • centerOffset - offset from the center point in a pie/donut series.
    • hiddenPointsDisplay - determines whether to hide slices of toggled points in pie and donut series.
    • enableSeriesToggle - determines whether to toggle the series visibility after click on a legend's box.
    • enableSelection - determines whether the serie is selectable.
  • annotations - an array of chart annotation objects.

    Each annotation has the following properties:

    • yValue - value to determine the vertical offset of the annotation.
    • xValue - value to determine the horizontal offset of the annotation.
    • yValue2 - optional 2nd value to determine the vertical offset of the annotation's bottom-right point.
    • xValue2 - optional 2nd value to determine the horizontal offset of the annotation bottom-right point.
    • offset - custom offset of the annotation relative to xValue & yValue, e.g. { x: -45, y: -25}
    • width - width of the annotation
    • height - width of the annotation
    • fillColor - fill/background color of the annotation.
    • lineColor - line color of the annotation.
    • type - shape type of the annotation, e.g. 'rect, circle, line, path'.
    • radius - radius of the annotation in case its type is 'circle'.
    • path - line path command in case the type is 'path', e.g. 'M 10,10 L 20,20 L 50,50'.
    • text - object describing the text of the annotation:
      • value - text of the annotation.
      • class - CSS class of the annotation.
      • angle - text rotation angle.
      • offset - offset of the annotation text relative to the base annotation offset, e.g. { x: 5, y: 10}
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);

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');

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');

showToolTips Boolean true

Enables or disables the chart tooltips.

Example:

 $('#jqxChart').jqxChart({showToolTips: false});
 $('#jqxChart').jqxChart('refresh');

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');

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');

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');

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.

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.

Events

Name Arguments
click Object

The event is raised when the user clicks on series element. Example:


 $('#jqxChart').jqxChart(settings);
 
 $('#jqxChart').on('click', function(e))
 {
 alert('event = ' + e.event + ' index = ' + e.elementIndex );
 }
 }

mouseover Object

The event is raised when the user moves the cursor above a series element. Example:


 // get the series groups of an existing chart
 var groups = $('#jqxChart').jqxChart('seriesGroups');
 
 // add a mouseover event handler function to the 1st group 
 if (groups.length> 0)
 {
 groups[0].mouseover = function(e)
 {
 alert('event = ' + e.event + ' index = ' + e.elementIndex );
 }
 
 // update the group
 $('#jqxChart').jqxChart({seriesGroups: groups});
 }

mouseout Object

The event is raised when the user moves the cursor out of a series element. Example:


 // get the series groups of an existing chart
 var groups = $('#jqxChart').jqxChart('seriesGroups');
 
 // add a mouseout event handler function to the 1st group 
 if (groups.length> 0)
 {
 groups[0].mouseout = function(e)
 {
 alert('event = ' + e.event + ' index = ' + e.elementIndex );
 }
 
 // update the group
 $('#jqxChart').jqxChart({seriesGroups: groups});
 }

refreshBegin Object

The event is raised when the chart begins rendering.

refreshEnd Object

The event is raised when the chart finishes rendering.

rangeSelectionChanged Object

The event is raised after the chart's range selector position changes and after the chart ends rendering.

rangeSelectionChanging Object

The event is raised when the chart's range selector position changes and before the chart starts rendering.

toggle Object

The event is raised when a serie is toggled by a user click in the chart's legend or through an API call.

Methods

Name Arguments Return Value
addColorScheme schemeName, array of colors None

Adds a new color sheme. If a scheme with the same name already exists the method will update its colors.

Parameter Type Description
schemeName String
colorsArray Array
Return Value
None

Code Example


 // setup the chart
 var myChart = $('#jqxChart').jqxChart(settings);
 // add a new color scheme named 'myScheme'
 myChart.jqxChart('addColorScheme', 'myScheme', ['#FF0000', '#00FF00', '#0000FF']);
 // apply the new scheme by setting the chart's colorScheme property
 myChart.jqxChart('colorScheme', 'myScheme');
 // refresh the chart
 myChart.jqxChart('refresh');

getItemsCount groupIndex, serieIndex Number

Note: Please, include jqxchart.api.js in order to access this API function.

Gets the number of rendered items in a specific serie.

Parameter Type Description
groupIndex Number
serieIndex Number
Return Value
Number

Code Example


 var chartInstance = $('#chartContainer').jqxChart('getInstance');
 var count = chartInstance.getItemsCount(0, 1);
 

getXAxisValue offset, groupIndex Number

Note: Please, include jqxchart.api.js in order to access this API function.

Gets the X Axis's value.

Parameter Type Description
offset Number
groupIndex Number
Return Value
Number

Code Example


 var chartInstance = $('#chartContainer').jqxChart('getInstance');
 var xvalue = chartInstance.getXAxisValue(position.x, 0); 

getValueAxisValue offset, groupIndex Number

Note: Please, include jqxchart.api.js in order to access this API function.

Gets the X Axis's value.

Parameter Type Description
offset Number
groupIndex Number
Return Value
Number

Code Example


 var chartInstance = $('#chartContainer').jqxChart('getInstance');
 var yvalue = chartInstance.getValueAxisValue(position.y, 0); 

getItemCoord groupIndex, serieIndex, itemIndex object

Note: Please, include jqxchart.api.js in order to access this API function.

Gets the rendered coordinates of a data point element.

Parameter Type Description
groupIndex Number
serieIndex Number
itemIndex Number
Return Value
Object

Code Example


 var chartInstance = $('#chartContainer').jqxChart('getInstance');
 var coord = chartInstance.getItemCoord(0, 1, i); 

getXAxisRect groupIndex {x, y, width, height}

Note: Please, include jqxchart.api.js in order to access this API function.

Gets the rendered rectangle coordinates of the x-Axis of specific serie group.

Parameter Type Description
groupIndex Number
Return Value
Object - {x, y, width, height}

Code Example


 var chartInstance = $('#chartContainer').jqxChart('getInstance');
 var rect = chartInstance.getXAxisRect(0);
 

getXAxisLabels groupIndex array

Note: Please, include jqxchart.api.js in order to access this API function.

Gets the rendered coordinates and values of the xAxis labels.

Parameter Type Description
groupIndex Number
Return Value
Array

Code Example


 var chartInstance = $('#chartContainer').jqxChart('getInstance');
 var rect = instance.getXAxisRect(0);
 var labels = chartInstance.getXAxisLabels(0);
 for (var i = 0; i < labels.length; i++) { renderer.rect(rect.x + labels[i].offset, rect.y, 50, 50, { fill: 'blue', opacity: 0.5 }); 
getValueAxisRect groupIndex {x, y, width, height}

Note: Please, include jqxchart.api.js in order to access this API function.

Gets the rendered rectangle coordinates of the valueAxis of specific serie group.

Parameter Type Description
groupIndex Number
Return Value
Object - {x, y, width, height}

Code Example


 var chartInstance = $('#chartContainer').jqxChart('getInstance');
 var rect = chartInstance.getValueAxisRect(0);
 

getValueAxisLabels groupIndex array

Note: Please, include jqxchart.api.js in order to access this API function.

Gets the rendered coordinates and values of the valueAxis labels.

Parameter Type Description
groupIndex Number
Return Value
Array - axis's labels

Code Example


 var chartInstance = $('#chartContainer').jqxChart('getInstance');
 var rect = instance.getValueAxisRect(0);
 var labels = chartInstance.getValueAxisLabels(0);
 for (var i = 0; i < labels.length; i++) { renderer.rect(rect.x, rect.y + labels[i].offset, -50, 50, { fill: 'blue', opacity: 0.5 }); 
getColorScheme schemeName array of colors or undefined

Returns the colors of a color scheme by name. If the scheme doesn't exist the method returns undefined.

Parameter Type Description
schemeName String
Return Value
Array - color scheme's colors

Code Example


 // get the colors of a scheme named 'myScheme'
 var schemeColors = $('#jqxChart').jqxChart('getColorScheme', 'myScheme');

hideSerie groupIndex, serieIndex, itemIndex None

Hides a chart serie. The result of calling this function is same as
the user unchecking the legend box of a chart serie. The itemIndex parameter is optional and applicable to pie and donut series only.

Parameter Type Description
groupIndex Number
serieIndex Number
itemIndex Number
Return Value
None

Code Example


 $('#jqxChart').jqxChart('hideSerie', 0, 1, NaN);

hideToolTip hideDelay None

Note: Please, include jqxchart.api.js in order to access this API function.

Hides the current tooltip if visible.

Parameter Type Description
hideDelay Number
Return Value
None

Code Example


 var chartInstance = $('#chartContainer').jqxChart('getInstance');
 
 chartInstance.hideToolTip(
 1000 /* hide after 1 second, optional parameter */
 );

refresh None None

Refreshes the content of the chart widget after a property or data update.

Parameter Type Description
None
Return Value
None

Code Example


 // select the chart element and change the color scheme
 $('#jqxChart').jqxChart({colorScheme: 'scheme02'});
 
 // refresh the chart element
 $('#jqxChart').jqxChart('refresh');

removeColorScheme schemeName None

Removes an existing color scheme. If the scheme does not exist the method has no effect.

Parameter Type Description
scheme String
Return Value
None

Code Example


 // remove an existing color scheme named 'myScheme'
 $('#jqxChart').jqxChart('removeColorScheme', 'myScheme');

saveAsJPEG fileName, exportServer 'chart.jpeg', ''

Exports the chart's content as JPEG image.
The browser must support HTML5 Canvas and the device must be able to connect to the export server. If you don't setup your own export server the default server is jqwidgets.com.

Parameter Type Description
fileName String
exportServer String/td>
Return Value
None

Code Example

 
 $('#jqxChart').jqxChart('saveAsJPEG', 'myChart.jpeg');

saveAsPNG fileName, exportServer 'chart.png', ''

Exports the chart's content as PNG image.
The browser must support HTML5 Canvas and the device must be able to connect to the export server. If you don't setup your own export server the default server is jqwidgets.com.

Parameter Type Description
fileName String
exportServer String/td>
Return Value
None

Code Example


 $('#jqxChart').jqxChart('saveAsPNG', 'myChart.png');

saveAsPDF fileName, exportServer 'chart.pdf', ''

Exports the chart's content as PDF.
The browser must support HTML5 Canvas and the device must be able to connect to the export server. If you don't setup your own export server the default server is jqwidgets.com.

Parameter Type Description
fileName String
exportServer String/td>
Return Value
None

Code Example


 $('#jqxChart').jqxChart('saveAsPDF', 'myChart.pdf');

showSerie groupIndex, serieIndex, itemIndex None

Shows a hidden chart serie. The result of calling this function is same as
the user checking the legend box of a chart serie. The itemIndex parameter is optional and applicable to pie and donut series only.

Parameter Type Description
groupIndex Number
serieIndex Number
itemIndex Number
Return Value
None

Code Example


 $('#jqxChart').jqxChart('showSerie', 0, 1, NaN);

showToolTip groupIndex, serieIndex, itemIndex, showDelay, hideDelay None

Note: Please, include jqxchart.api.js in order to access this API function.

Shows a the tooltip for a perticular data point.

							 
Parameter Type Description
groupIndex Number
serieIndex Number
itemIndex Number
showDelay Number
hideDelay Number
Return Value
None

Code Example

var chartInstance = $('#chartContainer').jqxChart('getInstance'); chartInstance.showToolTip( 0, /* first seriesGroup */ 1, /* second serie */ 5, /* fifth item */ 1000, /* 1s show delay, optional parameter */ 5000 /* 5s hide delay, optional parameter */ );
update None None

Updates the values of the chart series without full refresh of the entire chart. The method should be used for animation of frequently changing values. See the live updates example in the product demo.

Parameter Type Description
None
Return Value
None

Code Example


 updateDataValues();
 
 // update the chart series
 $('#jqxChart').jqxChart('update');


AltStyle によって変換されたページ (->オリジナル) /