ExtJS+ASP.NET自己定义曲线
第一步:创建Store数据源
var myData = [];
myData.push({ 'name': '1', 'Oil_Production': '30', 'Water_Injection': '55', 'Gas_Production': '23' });
myData.push({ 'name': '2', 'Oil_Production': '20', 'Water_Injection': '25', 'Gas_Production': '63' });
myData.push({ 'name': '3', 'Oil_Production': '20', 'Water_Injection': '25', 'Gas_Production': '63' });
myData.push({ 'name': '4', 'Oil_Production': '20', 'Water_Injection': '25', 'Gas_Production': '63' });
myData.push({ 'name': '5', 'Oil_Production': '20', 'Water_Injection': '25', 'Gas_Production': '63' });
myData.push({ 'name': '6', 'Oil_Production': '20', 'Water_Injection': '25', 'Gas_Production': '63' });
myData.push({ 'name': '7', 'Oil_Production': '20', 'Water_Injection': '25', 'Gas_Production': '63' });
myData.push({ 'name': '8', 'Oil_Production': '20', 'Water_Injection': '25', 'Gas_Production': '63' });
myData.push({ 'name': '9', 'Oil_Production': '20', 'Water_Injection': '25', 'Gas_Production': '63' });
myData.push({ 'name': '10', 'Oil_Production': '20', 'Water_Injection': '25', 'Gas_Production': '63' });
myData.push({ 'name': '11', 'Oil_Production': '20', 'Water_Injection': '25', 'Gas_Production': '63' });
myData.push({ 'name': '12', 'Oil_Production': '20', 'Water_Injection': '25', 'Gas_Production': '63' }); store1 = Ext.create('Ext.data.Store', {
fields: ['name', 'Oil_Production', 'Water_Injection', 'Gas_Production'],
data: myData
});
第二步:创建曲线
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: 'background:#fff',
animate: true,
store: store1,
shadow: true,//赋予线条阴影效果
theme: 'Category1',
legend: {
position: 'right'
},
axes: [{
type: 'Numeric',
minimum: 0,
position: 'left',
fields: ['Oil_Production', 'Water_Injection', 'Gas_Production'],
title: '日产油',
minorTickSteps: 0.1,
grid: {
odd: {
opacity: 1,
fill: '#ddd',
stroke: '#bbb',
'stroke-width': 0.5
}
}
}, {
type: 'Category',
position: 'bottom',
fields: ['name'],
title: '月份'
}],
series: [{
type: 'line',//说明这里是折线图
highlight: {
size: 7,
radius: 7
},
axis: 'left',
xField: 'name',
yField: 'Oil_Production',
markerConfig: {
type: 'circle',//关键转折点的类型
size: 4,
radius: 4,
'stroke-width': 0
}
}, {
type: '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自己定义曲线的更多相关文章
- ExtJS学习笔记:定义extjs类别
类的定义 Ext.define('Cookbook.Vehicle', { Manufacturer: 'Aston Martin', Model: 'Vanquish', getDetails: f ...
- asp.net预定义的HttpModule
在asp.net中,已经预定义了很多HttpModule,甚至在服务器的网站配置文件中进行了注册,我们可以通过系统文件夹C:\Windows\Microsoft.NET\Framework\v4.0. ...
- ASP.NET浏览器定义文件及IE兼容模式
由于ASP.NET4.0中的一个小bug,导致了ASP.NET WebForms控制的CallBack无效,部分控件无法使用. 解决方法是在项目中添加自定义的浏览器定义文件,参考这里:http://w ...
- ASP.NET MVC---自定义HtmlHelper方法
HtmlHelper方法是ASP.NET MVC中非常强大的特性,有了这个特性,我们就能更加随心所欲的定制自己的页面. 自定义自己的HtmlHelper方法通常有三种, 像是: 一.Razor语法 采 ...
- 可用于在 Microsoft.NET Framework 4.0 中的 ASP.NET 浏览器定义文件的修补程序
http://support.microsoft.com/kb/2600088 此修补程序为 Internet Explorer 和 Mozilla Firefox 在浏览器定义文件引入了更新的定义. ...
- ExtjS学习--------Ext.define定义类
Ext类Class的配置项:(注:Extjs的 的中文版帮助文档下载地址:http://download.csdn.net/detail/z1137730824/7748893 ExtJS配置文件和演 ...
- 【转】Asp.net MVC定义短网址
在MVC的逻辑代码里,Controller和Action是必须的,但是在网址里,并不需要完全体现Controller和Action.比如我们经常希望看到http://localhost/About而不 ...
- [asp.net core]定义Tag Helpers
原文地址 https://docs.microsoft.com/en-us/aspnet/core/mvc/views/tag-helpers/authoring Getting started wi ...
- ASP.NET MVC 定义JsonpResult实现跨域请求
1:原理 在js中,XMLHttpRequest是不能请求不同域的数据,但是script标签却可以,所以可以用script标签实现跨域请求.具体是定义一个函数,例如jsonp1234,请求不同域的ur ...
随机推荐
- Nexus 刷机
@echo offfastboot flash bootloader bootloader-hammerhead-hhz12k.imgfastboot flash radio radio-hammer ...
- Android FragmentActivity onActivityResult冲突问题
场景:假设fragment的填充数据是ListView,ListView中的每一项都有button,点击每一项的button跳转到B界面.在B界面处理完业务需返回fragment中更新数据. 解决方式 ...
- Android系统进程间通信(IPC)机制Binder中的Server启动过程源代码分析
文章转载至CSDN社区罗升阳的安卓之旅,原文地址:http://blog.csdn.net/luoshengyang/article/details/6629298 在前面一篇文章浅谈Android系 ...
- windows-JDK环境变量设置
JAVA_HOME=C:\Program Files\Java\jdk1.6.0_43;CLASS_PATH=.;%JAVA_HOME%\lib;%JAVA_HOME%\lib\tools.jar;p ...
- css-文本及其他
<!DOCTYPE html>css7-文本和其他 text-align行内元素对齐方式,值为 左/中/右 对齐:left/right/center.test{text-align:cen ...
- node 安装express
环境:win7 64位旗舰版 1 安装nodejs 2 安装npm 3 安装express 重点介绍安装express,前提是你已经安装nodejs和npm了. 1 安装express npm ins ...
- CGContext
CGContext又叫图形上下文,相当于一块画布,以堆栈形式存放,只有在当前 context上绘图才有效.iOS有分多种图形上下文,其中UIView自带提供的在drawRect:方法中通过 UIGra ...
- JQuery中阻止事件冒泡的两种方式及其区别
JQuery 提供了两种方式来阻止事件冒泡. 方式一:event.stopPropagation(); $("#div1").mousedown(function(event){ ...
- ajax + php + Controller 控制所有后台函数调用
转载请注明出处:http://www.cnblogs.com/ghypnus/p/4645873.html 好久没有来这边发布代码了 总共分成3大部分来完成php的ajax调用逻辑,以下是大致的结构 ...
- zabbix之3触发器/action及模板
1.触发器: {server_name:item_name.func.operator.condition} 一旦condition(条件)触发,则item状态改变 触发器之间可以存在依赖关系,即it ...