jQuery UI Widgets › Forums › Chart › does not show series if all value are equal
Tagged: Angular chart, auto, chart, jquery chart, jqxChart, minValue, value, valueAxis
This topic contains 9 replies, has 2 voices, and was last updated by Dimitar 9 years, 5 months ago.
-
Author
-
hello sir
I am trying to draw a chart where i found that if all values of series are equal nothing show their if scale is auto. my demo code is given below
var sampleData = [{
a: 1,
b: 1
}, {
a:1,
b: 2
}, {
a:1,
b: 3
}, {
a:1,
b: 5
}, {
a: 1,
b: 6
}, {
a: 1,
b: 7
}, {
a: 1,
b: 8
}];
var settings = {
title: “Logarithmic Scale Axis Example”,
description: “Sample logarithmic scale axis with base 2″,
padding: {
left: 5,
top: 5,
right: 5,
bottom: 5
},
titlePadding: {
left: 0,
top: 0,
right: 0,
bottom: 10
}, categoryAxis: {
dataField: ‘b’,
description: ”,
showGridLines: true,
showTickMarks: true
},
source: sampleData,
enableAnimations: true,seriesGroups: [{
type: ‘spline’,
valueAxis: {
description: ‘Value’,horizontalTextAlignment: ‘right’
},
series: [{
dataField: ‘a’,
displayText: ‘A’,
lineWidth:1,
emptyPointsDisplay :’skip’}]
}]
};
$(‘#jqxChart’).jqxChart(settings);Hello Rasul Gani Sheikh,
To fix this, you just need to set the valueAxis minValue (to 0 for example).
Best Regards,
DimitarjQWidgets team
http://www.jqwidgets.com/Hello sir,
Thanks for your replybut I need to Implement a auto scale chart so I can not fix my graph scale.Graph is working fine for all case except that if all values are same and less then or equal to 0
like
var sampleData = [{a: -1,b: 1}, {a:-1,b: 2}, {a:-1,b: 3}];I am using jQWidgets v3.7.1
Hello Rasul Gani Sheikh,
I understand, but the data in your data source is not sufficient for the jqxChart algorithm to automatically determine the most suitable min and max values for the valueAxis. If you do not wish to set the minValue, however, you should at least set the valueAxis unitInterval (e.g. to 0.5) and the chart will be plotted successfully.
Best Regards,
DimitarjQWidgets team
http://www.jqwidgets.com/please see below url
I can not fix unitinterval because I need to draw a random chart where some times my data in decimal places and some times its in thousands.
its working fine except that if all values are same and less then or equal to 0
Hi Rasul Gani Sheikh,
I am sorry but we cannot offer you any other solution. With such limited data, the chart cannot “know” what settings you expect to be plotted.
Best Regards,
DimitarjQWidgets team
http://www.jqwidgets.com/Thanks for solve problem in
jqwidgets 3.8.1
jqxChart Value axis automatic selection of optimal interval when all values are identical.but problem still exists in case of all the values are 0
and also y axis always start with 0 if all values are same
Hi Rasul Gani Sheikh,
Thank you for your feedback, but this is all we can offer at the moment. We will consider improving the chart’s behaviour in the future.
Best Regards,
DimitarjQWidgets team
http://www.jqwidgets.com/ -
AuthorPosts
You must be logged in to reply to this topic.