jQWidgets is a JavaScript framework for making web-based applications for PC and mobile devices. It is a very powerful and optimized framework, platform-independent, and widely supported. jqxChart is a lightweight and powerful chart widget written 100% in JavaScript. It offers many advanced features and supports three different rendering technologies – SVG, HTML5 Canvas & VML.
The valueAxis property is used to set the value-axis of the displayed jqxChart. It is of type object and its default value is "null".
Syntax:
$('#Selector').jqxChart({
valueAxis: {
minValue: 0,
maxValue: 10,
unitInterval: 10,
description: 'Questions Solved'
},
});
Properties of the valueAxis:
visible: It is used to show or hide the valueAxis .unitInterval: It is used to set the interval between the units of the displayed jqxChart.logarithmicScale: It is used to determine if the logarithmic scale needs to be used or not.logarithmicScaleBase: It is the stated base for the logarithmic scale.customDraw: It is of type boolean. It determines whether to draw the axis or not.flip: It states if the axis is shown in reverse order or not.position: It is used to set the position of the axis.padding: It is of type object. It describes the padding of the axis which is as follows:top: It is the stated top padding.bottom: It is the bottom padding.title: It is of type object. It describes the title of the axis which is as follows:visible : It is of boolean type. It determines the visibility of the title.text : It is the stated text of the title.class : It is the stated CSS class of the text in the title.horizontalAlignment : It is the stated horizontal alignment.verticalAlignment : It is the stated vertical alignment.tickMarks: It is of type object. It describes the axis's tick marks properties which are as follows:visible : It is used to determine visibility.step : It is the stated step.dashStyle : It is the stated dash style of the tick marks.lineWidth : It is the stated line width of the tick marks.size : It is the stated size of the tick marks.color : It is the stated color of the tick marks.gridLines: It is of type object. It describes the grid lines properties of the axis which are as follows:visible : It determines the visibility.step : It is the stated step.dashStyle : It is the stated dash style of the grid lines.lineWidth : It is the stated line width of the grid lines.color : It is the color of the grid lines.line: It is of type object. It describes the line properties of the axis which are as follows:visible : It is of boolean type. It determines the axis line's visibility.dashStyle : It is the dash style of the line.lineWidth : It is the width of the line.color : It is the color of the line.labels: It is of type object. It describes the properties of the labels on the axis which are as follows:visible : It determines the visibility of the labels of the axis.step : It is the stated step.class : It is the stated CSS class.angle : It is the rotation angle of the text.horizontalAligment : It is the stated horizontal alignment of the labels.verticalAligment : It is the vertical alignment of the labels.offset : It is the stated offset of the labels.alternatingBackgroundColor: It is the stated alternating background color in between the grid lines.alternatingBackgroundColor2: It is the second alternating background color between the grid lines.alternatingBackgroundOpacity: It is the stated opacity of the alternating background.formatSettings: It is the stated settings that are used to format the shown values.formatFunction: It is the stated custom function in order to format the shown values.Linked Files: Download jQWidgets from the given link. In the HTML file, locate the script files in the downloaded folder:
<link rel=”stylesheet” href=”jqwidgets/styles/jqx.base.css” type=”text/css” /> <script type=”text/javascript” src=”scripts/jquery-1.11.1.min.js”></script> <script type=”text/javascript” src=”jqwidgets/jqxcore.js”></script> <script type=”text/javascript” src=”jqwidgets/jqxchart.core.js”></script> <script type=”text/javascript” src=”jqwidgets/jqxdraw.js”></script> <script type=”text/javascript” src=”jqwidgets/jqxdata.js”></script>
Example 1: The below example illustrates the jQWidgets jqxChart valueAxis property.
Output:
👁 Image
Example 2: The following is another example of the jqxChart valueAxis property in jQWidgets.
Output:
👁 Image
Reference: https://www.jqwidgets.com/jquery-widgets-documentation/documentation/jqxchart/jquery-chart-api.htm?search=