目录

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. spring-data-redis的事务操作深度解析--原来客户端库还可以攒够了事务命令再发?

    一.官方文档 简单介绍下redis的几个事务命令: redis事务四大指令: MULTI.EXEC.DISCARD.WATCH. 这四个指令构成了redis事务处理的基础. 1.MULTI用来组装一个 ...

  2. phpstorm10激活加汉化

    所用到的文件:链接:http://pan.baidu.com/s/1boNqCcJ 密码:61nz 分享文件夹中,有一个“PHP Storm激活和汉化方法.zip”文件其中有一个“resources_ ...

  3. Visual Studio 2015打开ASP.NET MVC的View提示"Object reference not set to an instance of an object"错误的解决方案

    使用Visual Studio 2013打开没有问题,但Visual Studio 2015打开cshtml就会提示"Object reference not set to an insta ...

  4. Json.NET Deserialize时如何忽略$id等特殊属性

    由于$id.$ref等是默认Json.NET的特殊属性,在反序列化时不会将其对应的值填充,例如: [DataContract] public class MyObject { [DataMember( ...

  5. pycharm的版本问题

    1.分类: 专业版是收费的 Professional 教育版是免费 edu https://www.jetbrains.com/pycharm-edu/whatsnew/ 社区版是免费的 Free C ...

  6. 解决-Dmaven.multiModuleProjectDirectory system property is not set. Check $M2_HOME environment variabl

    1.添加M2_HOME的环境变量 2.Preference->Java->Installed JREs->Edit 选择一个jdk, 添加  -Dmaven.multiModuleP ...

  7. 【POJ2154】Color Pólya定理+欧拉函数

    [POJ2154]Color 题意:求用$n$种颜色染$n$个珠子的项链的方案数.在旋转后相同的方案算作一种.答案对$P$取模. 询问次数$\le 3500$,$n\le 10^9,P\le 3000 ...

  8. 【C#】浏览器源代码

    using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; usin ...

  9. R的transform

    函数transform 作用:为原数据框添加新的列,改变原变量列的值,通过赋值NULL删除列变量 用法: transform(‘data’,….) data就是要修改的data,  '…..'代表你要 ...

  10. VUE中父组件向子组件传递数据 props使用

    VUE中,子组件是不能直接访问父组件的数据(一般来说,当然如果你要破坏原则也是可以),如下< <body> <div id="fathercomponent" ...