PDA

View Full Version : how to add extra horizontal in line chart to show the limit of a storage used



@naresh
19 Feb 2013, 5:14 AM
hi i am using the line chart and i want to add a line in a specific storage that is 2GB in y axis .please give your opinion ,thanks, NARESH

scottmartin
19 Feb 2013, 12:50 PM
You can add another line series.

Scott.

@naresh
20 Feb 2013, 10:27 PM
this is my code please give me hits to add line

{
xtype: 'linechart',
id:'storeID',
minorTickSteps: 1,
theme: 'Green',
store: storageStore(),
yField: 'storage',
url: '../js/ext-3.4.0/resources/charts.swf',
xField: 'date',
xAxis: new Ext.chart.CategoryAxis({
title: 'Date'
}),
yAxis: new Ext.chart.NumericAxis({
title: 'Storage Used (KB)',
stackingEnabled: true //this is for data range in data base regarding graph by naresh
}),
tipRenderer : function(chart, record){

return Ext.util.Format.number(record.data.storage, '.000000') + ' KB storage used in ' + record.data.date;
},
listeners: {
beforerefresh: function(chart) {
return Ext.isDefined(chart.swf.setDataProvider);
}
},
extraStyle: {
xAxis: {
labelRotation: 0
},
yAxis: {
titleRotation: -90
}
}
}

@naresh
21 Feb 2013, 10:38 AM
please reply

scottmartin
21 Feb 2013, 10:45 AM
In your code:

url: '../js/ext-3.4.0/resources/charts.swf',

But you have posted in Ext4 forums?

Is this for Ext3?

Scott

@naresh
21 Feb 2013, 10:46 AM
ok ,so can i do in extjs 3.4

scottmartin
21 Feb 2013, 10:56 AM
It should be possible, I just need to refresh myself on this as we used YUI charts(swf) for Ext3.

Moved to Ext3 forums ..

Scott

scottmartin
21 Feb 2013, 12:34 PM
Taken from our online example:
http://dev.sencha.com/deploy/ext-3.4.0/examples/chart/charts.html

// last chart .. multiple series .. in your case, you would have 2 line types


series: [{
type: 'column',
displayName: 'Page Views',
yField: 'views',
style: {
image:'bar.gif',
mode: 'stretch',
color:0x99BBE8
}
},{
type:'line',
displayName: 'Visits',
yField: 'visits',
style: {
color: 0x15428B
}