PDA

View Full Version : extjs bar chart generation



sagar21789
18 May 2012, 6:45 AM
Hello,
I am working on extjs & i want to make a bar chart from xml
Here is my XML

http://pastebin.ca/2150257

I (http://pastebin.ca/2150257) hav made grid like this
columns: [
{text: "Department Performance", flex: 1,dataIndex: 'DepartmentPerformance', sortable: true},
{text : 'Domestic',
columns: [
{text: "YTD", width: 50, dataIndex: 'DomesticYTD', sortable: true},
{text: "MTD", width: 50, dataIndex: 'DomesticMTD', sortable: true},
{text: "Daily", width: 50, dataIndex: 'DomesticDaily', sortable: true}
]},
{text : 'Other',
columns: [
{text: "YTD", width: 50, dataIndex: 'OtherYTD', sortable: true},
{text: "MTD", width: 50, dataIndex: 'OtherMTD', sortable: true},
{text: "Daily", width: 50, dataIndex: 'OtherDaily', sortable: true},
]},
{text : 'Total',
columns: [
{text: "YTD", width: 50, dataIndex: 'TotalYTD', sortable: true},
{text: "MTD", width: 50, dataIndex: 'TotalMTD', sortable: true},
{text: "Daily", width: 50, dataIndex: 'TotalDaily', sortable: true},
]},

{text : 'OEM',
columns: [
{text: "YTD", width: 50, dataIndex: 'OEMYTD', sortable: true},
{text: "MTD", width: 50, dataIndex: 'OEMMTD', sortable: true},
]},

],

& i want to make a graph by row as click on row I dont know how to use listeners & make a column chart

like on X-axis 3 sections Domestic & Other & Total , in each section YTD,MTD,DAILY
& Y -axis only values 0 to max value


I tried a lot but not able create chart by row value


Please Help.................
Thanks

scottmartin
3 Jun 2012, 4:20 PM
Do you mean something like this?
http://dev.sencha.com/deploy/ext-4.1.0-gpl/examples/charts/FormDashboard.html

Regards,
Scott.

sagar21789
7 Jun 2012, 5:58 AM
Thanks

I have used itemclick listeners & create arraystore which is used for bar chart

Regards,
Amit