jQWidgets Forums
jQuery UI Widgets › Forums › Chart › Polar chart not respecting min, max and unit interval specs
Tagged: chart
This topic contains 3 replies, has 2 voices, and was last updated by jmentey 7 years, 10 months ago.
-
Author
-
Hi,
(a) The polar plot does not seem to respect the minValue, maxValue, UnitInterval settings for the valueAxis. I set min,max to be -33 and 351 while the unit interval = 96. I expect the labels to show up as -33, 63, 159, 255 and 351. But the chart shows completely different intervals moreover a zero value as an interval. I shared the fiddle here https://www.jseditor.io/?key=polar-plot-spacing-issue
(b) Also the last value doesn’t show up on the value axis, the outermost circle. Is there a way to show that value too.
Can you please let me know how I can get the desired spacing and labels?
Regards,
Jeswanth.The workaround is to use unitInterval:1 and step: 96
seriesGroups: [ { polar: true, radius: 120, startAngle: 90, endAngle: 90 + 359.99, type: 'line', valueAxis: { labels: { formatSettings: { decimalPlaces: 0 }, autoRotate: true, step: 96 }, gridLines: {step: 96}, minValue: -33, maxValue: 351.1, unitInterval: 1 }, series: [ { dataField: 'Pressure', displayText: 'Pressure', opacity: 0.7, radius: 2, lineWidth: 2 } ] } ]
Hi Peter,
Thanks a lot for your response and providing a work around. I think this works only if your spacing between gridlines is an integer. For example, if the spacing is 96.25, and I adjusted the min and max accordingly to be -33.25 and 351.75 so that we get equal intervals of 96.25. Here is the snippet
seriesGroups:
[
{
polar: true,
radius: 120,
startAngle: 90,
endAngle: 90 + 359.99,
type: ‘line’,
valueAxis:
{
labels: {
formatSettings: { decimalPlaces: 2 },
autoRotate: true,
step: 96.25
},
gridLines: {step: 96.25},
minValue: -33.25,
maxValue: 351.75,
unitInterval: 1
},
series: [
{ dataField: ‘Pressure’, displayText: ‘Pressure’, opacity: 0.7, radius: 2, lineWidth: 2 }
]
}
]I don’t see the grid lines at the specified spacing. Even after increasing the decimal places to 2, I still see the integers. In engineering simulations, we often times end up with fractions and its not possible to have gridlines at integers all the time. Is there a work aroud for this as well?
Regards,
Jeswanth.This is the fiddle showing that the solution proposed doesn’t work when we have non integer intervals.
https://www.jseditor.io/?key=polar-plot-spacing-issue-non-integer
-
AuthorPosts
You must be logged in to reply to this topic.