-
1. Re: RichFaces: Bar Chart changes x-axis order
michpetrov Jan 2, 2015 11:41 AM (in response to henry_g1)I can't replicate it, I've fixed this issue in 4.5.1 and I don't see where it might be failing. Can you check the JavaScript output if the data are ordered correctly there?
-
2. Re: RichFaces: Bar Chart changes x-axis order
henry_g1 Jan 4, 2015 10:46 PM (in response to michpetrov)Here's the JavaScript:
<td><div class=" chart-container" id="j_idt5:dashboard:barChart"><div class="chart-title">Sales by Month</div><div class="chart" id="j_idt5:dashboard:barChartChart"></div><script type="text/javascript">//
new RichFaces.ui.Chart("j_idt5:dashboard:barChart", RichFaces.jQuery.extend({
handlers: RichFaces.jQuery.extend(),
particularSeriesHandlers: {"onplothover":[null],"onplotclick":[null]},
data: [{"data":{"October":163.68,"December":37.0875,"September":0,"January":19.296249999999997,"November":256.1291},"bars":{"show":true}}],
},
{"xaxis":{"axisLabel":"Month"},"xtype":"string","serverSideListener":false,"legend":{},"charttype":"bar","zoom":false,"ytype":"number","yaxis":{"axisLabel":"Total($)"}}
));
//</script></div></td>
It's in the order shown in the chart.
However, you clued me to what the problem is: I'm in fact using 4.5.0. I'll update to 4.5.1 and try again.
UPDATE: With the richfaces libs updated to 4.5.1 it works perfectly ... sorry about the oversight on my part and thanks for the help.