First step: Create a store data source
var myData = []; Mydata.push ({' Name ': ' 1 ', ' oil_production ': ' + ', ' water_injection ': ' + ', ' gas_production ': ' 23 '}); Mydata.push ({' Name ': ' 2 ', ' oil_production ': ' A ', ' water_injection ': ' + ', ' gas_production ': ' 63 '}); Mydata.push ({' Name ': ' 3 ', ' oil_production ': ' A ', ' water_injection ': ' + ', ' gas_production ': ' 63 '}); Mydata.push ({' Name ': ' 4 ', ' oil_production ': ' A ', ' water_injection ': ' + ', ' gas_production ': ' 63 '}); Mydata.push ({' Name ': ' 5 ', ' oil_production ': ' A ', ' water_injection ': ' + ', ' gas_production ': ' 63 '}); Mydata.push ({' Name ': ' 6 ', ' oil_production ': ' A ', ' water_injection ': ' + ', ' gas_production ': ' 63 '}); Mydata.push ({' Name ': ' 7 ', ' oil_production ': ' A ', ' water_injection ': ' + ', ' gas_production ': ' 63 '}); Mydata.push ({' Name ': ' 8 ', ' oil_production ': ' A ', ' water_injection ': ' + ', ' gas_production ': ' 63 '}); Mydata.push ({' Name ': ' 9 ', ' oil_production ': ' A ', ' water_injection ': ' + ', ' gas_production ': ' 63 '}); Mydata.push ({' Name ': ' 10 '), ' oil_production ': ' A ', ' water_injection ': ' + ', ' gas_production ': ' 63 '}; Mydata.push ({' name ': ' One ', ' oil_production ': ' A ', ' water_injection ': ' + ', ' gas_production ': ' 63 '}); Mydata.push ({' name ': ' N ', ' oil_production ': ' A ', ' water_injection ': ' + ', ' gas_production ': ' 63 '}); Store1 = ext.create (' Ext.data.Store ', {fields: [' name ', ' oil_production ', ' water_injection ', ' gas_production '), Data:mydata});
Step two: Create a curve
Ext.require (' ext.chart.* '); Ext.require ([' Ext.window ', ' Ext.fx.target.Sprite ', ' Ext.layout.container.Fit ', ' Ext.window.MessageBox ']); Ext.onready (function () {//store1.loaddata (Generatedata (8)); var chart = ext.create (' Ext.chart.Chart ', {renderto:div3, width:500, height:300, style: ' B Ackground: #fff ', Animate:true, Store:store1, shadow:true,//gives the line shadow effect theme: ' Category1 ', Legend: {position: ' right '}, axes: [{type: ' Numeric ', minimum:0, Position: "Left", fields: [' oil_production ', ' water_injection ', ' gas_production '], title: ' Nissan Oil ', minorticksteps:0.1, grid: {odd: {opacity:1, Fill: ' #ddd ', Stroke: ' #bbb ', ' stroke-width ': 0.5} }}, {type: ' Category ', Position: ' BoTtom ', fields: [' name '], title: ' Month '}], series: [{type: ' line ',//Description Here is a lines chart Highlight: {size:7, radius:7}, Axis: ' Left ', Xfield: ' Name ', Yfield: ' Oil_production ', Markerconfig: {type: ' Circle ',//type of key turning point Size:4, Radius:4, ' Stroke-width ': 0}}, {Ty PE: ' line ', highlight: {size:7, radius:7}, Axis: ' Left ' , Smooth:true, Xfield: ' Name ', Yfield: ' Water_injection ', Markerconfig: { Type: ' Circle ', Size:4, radius:4, ' stroke-width ': 0 }}, {type: ' line ', highlight: {size:7, radius:7 }, Axis: ' LeFt ', smooth:true, Xfield: ' Name ', Yfield: ' Gas_production ', Markerconfig: { Type: ' Circle ', Size:4, radius:4, ' stroke-width ': 0 } }] });});
Extjs+asp. NET Custom Curves