-
26 Nov 2011 6:39 PM #1
Query on Ext js TimeAxis
Query on Ext js TimeAxis
Hi,
I am using a Ext js 3.4 columnchart and a stacked column chart , in which yAxis is a numeric axis and x axis as TimeAxis.
The numeric axis always start at zero and units are displayed according to values . However ,my TimeAxis does start on the least month with store has . I could see all the columns/bars. But the problem is since the value ranges from say Dec -1 -YYYY., my first bar always start on zeroth position. Is there a way to shift the bar , to first axis value, instead of zeroth axis value?
Also , is there a way to display the time axis label , exactly same as value?
My chart code is as below .
Code:{ xtype:'stackedcolumnchart', height:300, store: mychartStore, xField: 'timePeriod', xAxis: new Ext.chart.TimeAxis({ labelRenderer: Ext.util.Format.dateRenderer('m/Y') }), yAxis: new Ext.chart.NumericAxis({ stackingEnabled: true, title: 'Dollars', labelRenderer: function(value) { return Ext.util.Format.number(value, '123,456.78'); } }), series: [{ yField:'earning', displayName: 'Earnings', style: { color: "#748746" } },{ yField:'principal', displayName: 'Principal', style: { color: "#8C3F3A" } }], }
-
27 Nov 2011 7:37 AM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,650
- Vote Rating
- 434
The YUI charts will try to do a lot of magic.. some of which is not exactly what everyone wants. You could check the YUI docs to see how to customize what you want.
Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
https://github.com/mitchellsimoens
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services services@sencha.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!
When posting code, please use BBCode's CODE tags.
-
28 Nov 2011 9:53 AM #3
Thank you. My collegue helped.
Instead of setting the xAxis to TimeAxis, donot set any. The chart will render its default. It worked.


Reply With Quote