jsf 2 - primefaces3.0 X-scale value change -


i'm implementing line charts of primefaces(3.0) , i'm trying change value of x-scale

the values i'm using minx="0" maxx="38" , since primefaces linecharts using jqplot , added script

<script>            $(function(){                widget_category.plot.axes.xaxis._tickinterval = 1;                widget_category.plot.axes.xaxis.numberticks = 38;             }); </script> 

but still coordinates coming in decimals.

i mention y scale, values used miny="40" maxy="110" style="height:1005px;" , figured out scale value , can 10 if height defined 1005px i.e. 5 * 14 = 70 means y scale of 5 intervals , 14 values , line height 1005 5*14*14 = 980 + 25 (which top-margin added) 1005.

though same not working out x-scale.

any helpful.

the arithmetic in y values multiplication operations on whole numbers, result in whole number. these whole numbers correlate pixels.

your x range involves multiplication of 1.0 , 38, 1 being integer value , other being determined float or double number. when performing multiplication operation 1 number float result value float, , standard floating point artithmetic rules apply. why coordinates coming in decimals don't equate pixels.

when using javascript need careful of these kinds of pitfalls because not typed language java , not point things out you.


Comments

Popular posts from this blog

jasper reports - Fixed header in Excel using JasperReports -

media player - Android: mediaplayer went away with unhandled events -

python - ('The SQL contains 0 parameter markers, but 50 parameters were supplied', 'HY000') or TypeError: 'tuple' object is not callable -