目录

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的更多相关文章

  1. Highcharts - Bar Chart & Column Chart

    1. 条形图(Bar Chart)需要的数据格式类型如下: ["Luke Skywalker", "Darth Vader", "Yoda" ...

  2. [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 ...

  3. Hello Stacked Column Chart

    <navigation:Page xmlns:toolkit="http://schemas.microsoft.com/winfx/2006/xaml/presentation/to ...

  4. 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 ...

  5. 矢量Chart图表嵌入HTML5网络拓扑图的应用

    使用 HT for Web (以下简称 HT)开发HTML5网络拓扑图的开发者有 Chart 需求的项目的时候,感觉很痛苦,HT 集成的 Chart 组件中,并不包含有坐标,在展现方面不是很直观,但是 ...

  6. Chart Style

    How to add label to column chart http://blogs.msdn.com/b/delay/archive/2009/07/27/simple-column-labe ...

  7. [Ext JS 4] 实战Chart 协调控制(单一的坐标,两个坐标)

    前言

  8. flex stacked column graph

    Flex: Stacked column chart – programmatically in actionscript By bishopondevelopment I was looking f ...

  9. [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 ...

随机推荐

  1. 【BZOJ5094】硬盘检测 概率

    [BZOJ5094]硬盘检测 Description 很久很久以前,小Q买了一个大小为n单元的硬盘,并往里随机写入了n个32位无符号整数.因为时间过去太久,硬盘上的容量字眼早已模糊不清,小Q也早已忘记 ...

  2. Power Shell 学习笔记

    Powershell 是运行在windows机器上实现系统和应用程序管理自动化的命令行脚本环境. 桌面右击任务栏开始图标,打开控制台对话窗: Windows PowerShell ISE 应用程序的文 ...

  3. 关于IP地址子网的划分

  4. 生存分析(survival analysis)

    一.生存分析(survival analysis)的定义 生存分析:对一个或多个非负随机变量进行统计推断,研究生存现象和响应时间数据及其统计规律的一门学科. 生存分析:既考虑结果又考虑生存时间的一种统 ...

  5. python中列表排序,字典排序,列表中的字典排序

    #-*- encoding=utf-8 -*- # python3代码 import operator 一. 按字典值排序(默认为升序) x = {1:2, 3:4, 4:3, 2:1, 0:0} 1 ...

  6. centos6.9环境下JDK安装

    1.准备jdk安装文件: 这里我使用的是 jdk-7u79-linux-x64.tar.gz 2.在 /usr/local 目录下创建 sotfware目录,并上传JDK文件: 解压文件并修改文件夹为 ...

  7. zabbix中文乱码的问题

    在使用zabbix时,有时候会出现中文乱码的问题,如下: 因为zabbix自身对中文简体的支持不完善,需要我们手动的去上传新的字体进行替换: 1.在windows获取字体库文件 在Windows上的字 ...

  8. jquery 设置style:display 其实很方便的哦

    ("#id").css('display','none'); $("#id").css('display','block'); 或 $("#id&qu ...

  9. 源代码的管理与在eclipse中使用maven进行代码测试

    管理源代码的工具 开发历史记录 SVN :集中式的源代码管理工具 通常必须连到公司的服务器上才能正常工作 (提交代码,查看代码的历史记录 查看代码的分支) 在公司中开发项目时 每天必须至少提交(Com ...

  10. 这个代码给所有带有name属性的链接加了一个背景色

    jQuery起点教程之使用选择器和事件jQuery提供两种方式来选择html的elements: 第一种是用CSS和Xpath选择器联合起来形成一个字符串来传送到jQuery的构造器(如:$(&quo ...