kendo column chart
目录
1、用js操作chart,
2、tooltip template鼠标悬浮显示内容,
3、双坐标轴,axisCrossingValues: [0, 30],3指的是跨越横坐标轴标签项数,显示在右侧
4标签永远在下边,categoryaxis里多加个series-axis,valueAxes里加个 axisCrossingValue: [0, @int.MinValue]
5、更新数据
6、全部代码
7、图中只有一种柱,统一设置颜色,用.Column().Color("#5EB6E4")
@(Html.Kendo().Chart<ChartSeriesModel>()
.Name("equipmentChart")
.Title(Resources.RegionEquipmentReportMachineTotal)
.Legend(legend => legend.Visible(false))
.DataSource(ds => ds.Read(read => read.Action("GetEquipmentTotalData", "ReportManage")))
.SeriesDefaults(seriesDefaults => seriesDefaults
.Column().Color("#5EB6E4")
)
.Series(series => series.Column(model => model.Value,null, model => model.Category, null))
.Tooltip(tooltip => tooltip
.Visible(true)
.Format("{0}")
)
1、用js操作chart,
2、tooltip template鼠标悬浮显示内容,
3、双坐标轴,axisCrossingValues: [0, 30],3指的是跨越横坐标轴标签项数,显示在右侧
4标签永远在下边,categoryaxis里多加个series-axis,valueAxes里加个 axisCrossingValue: [0, @int.MinValue]
categoryAxis: [{
line: {
visible: false
},
name: 'series-axis',
axisCrossingValues: [0, 30]
}, {
line: {
visible: false
},
categories: otherCategoryData,
name: 'label-axis',
axisCrossingValues: [0, 30]
}
],
5、更新数据
$("#chartType").data("kendoChart").options.series[0].data = [
{
category: "500万元以下",
value: firstLayerAmount,
color: "#CCFFCC"
}, {
category: "500-1000万元",
value: secondLayerAmount,
color: "#99CCCC"
}, {
category: "1000-2000万元",
value: thirdLayerAmount,
color: "#9999CC"
}, {
category: "2000-5000万元",
value: fourthLayerAmount,
color: "#CC99CC"
}
];
$("#chartType").data("kendoChart").refresh();
6、全部代码
$("#otherChart").kendoChart({
title: {
text: verticleCompareField + "利润总额其他方面分布图"
},
legend: {
position: "top"
},
tooltip: {
visible: true,
template: '#= series.name #: #= value #'
},
series: [
{
name: "利润总额",
type: "column",
data: otherAmountData,
axis: "amount"
},
{
name: "企业数量",
type: "column",
data: otherCountData,
axis: "companyCount"
}
],
valueAxes: [
{
title: { text: "万元" },
name: "amount",
color: "#ff6800",
axisCrossingValue: [0, @int.MinValue]
}, {
name: "companyCount",
title: { text: "家" },
color: "#a0a700",
axisCrossingValue: [0, @int.MinValue]
}
],
categoryAxis: [{
line: {
visible: false
},
name: 'series-axis',
axisCrossingValues: [0, 30]
}, {
line: {
visible: false
},
categories: otherCategoryData,
name: 'label-axis',
axisCrossingValues: [0, 30]
}
],
pannable: {
lock: "y"
},
zoomable: {
mousewheel: {
lock: "y"
},
selection: {
lock: "y"
}
}
});
}
};
kendo column chart的更多相关文章
- Highcharts - Bar Chart & Column Chart
1. 条形图(Bar Chart)需要的数据格式类型如下: ["Luke Skywalker", "Darth Vader", "Yoda" ...
- [D3] Build a Column Chart with D3 v4
Column and bar charts are staples of every visualization library. They also make a great project for ...
- Hello Stacked Column Chart
<navigation:Page xmlns:toolkit="http://schemas.microsoft.com/winfx/2006/xaml/presentation/to ...
- Displaying Data in a Chart with ASP.NET Web Pages (Razor)
This article explains how to use a chart to display data in an ASP.NET Web Pages (Razor) website by ...
- 矢量Chart图表嵌入HTML5网络拓扑图的应用
使用 HT for Web (以下简称 HT)开发HTML5网络拓扑图的开发者有 Chart 需求的项目的时候,感觉很痛苦,HT 集成的 Chart 组件中,并不包含有坐标,在展现方面不是很直观,但是 ...
- Chart Style
How to add label to column chart http://blogs.msdn.com/b/delay/archive/2009/07/27/simple-column-labe ...
- [Ext JS 4] 实战Chart 协调控制(单一的坐标,两个坐标)
前言
- flex stacked column graph
Flex: Stacked column chart – programmatically in actionscript By bishopondevelopment I was looking f ...
- [D3] Animate Chart Axis Transitions in D3 v4
When the data being rendered by a chart changes, sometimes it necessitates a change to the scales an ...
随机推荐
- sencha touch 在视图中显示一个html页面
Ext.define('app.view.about.About', { alternateClassName: 'about', extend: 'Ext.Container', xtype: 'a ...
- kvm虚拟机的重命名
1.查看所有的kvm虚拟机 [root@5201351_kvm ~]# virsh list --all 2.重命名kvm虚拟机最好是将虚拟机先关机,然后再导出其xml文件 [root@5201351 ...
- 在eclipse中编辑linux上的项目
以前在linux的上接口自动化项目都是使用notepad++或SVN下载到本地后再上传来完成功做,但在调试时非常麻烦. 查看了下在eclipse中有一个非常好用的插件Remote Systems,可以 ...
- Android aapt使用小结
Android打包成Apk后,其实是一个压缩文件,我们用winrar打开也能看到里面的文件结构.还能看到AndroidManifest.但是里面的内容有点问题. 不知道是因为加密还是Android就是 ...
- Linux shell一行流编程实践
Linux下很多命令用起来真相当方便,尤其是进行批处理操作时.(话说感觉这种程序也不复杂,windows咋一直不搞一个好用的shell呢) 这里列出一些实际shell操作的应用场景,具体命令的用法与解 ...
- dubbo入门之helloWorld
dubbo官方文档:http://dubbo.apache.org/zh-cn/docs/user/quick-start.html 基于spring coloud的demo:http://start ...
- backbone.js之Model篇 简单总结和深入(2)
一.模型属性的一些操作方法 1.mmodel.get() 获取属性的值 2.mmodel.set('age',5) 更新单个属性的值 mmodel.set({name:'aaa',age:6}) ...
- 应用程序添加角标和tabBar添加角标,以及后台运行时显示
1.设置角标的代码: // 从后台取出来的数据可能是int型的不能直接给badgeValue(string类型的),需要通过description转化 NSString *count = [re ...
- POJ-1926 Pollution
Pollution Time Limit: 1000MS Memory Limit: 30000K Total Submissions: 4049 Accepted: 1076 Description ...
- hdu4027Can you answer these queries?【线段树】
A lot of battleships of evil are arranged in a line before the battle. Our commander decides to use ...