使用ASP.NET C#中的highcharts将动态值传递到x axix和Y轴以获取条形图 [英] Passing dynamic values to x axix and Y axis for bar charts using highcharts in ASP.NET C#

查看:215
本文介绍了使用ASP.NET C#中的highcharts将动态值传递到x axix和Y轴以获取条形图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨我在asp.net c#应用程序中使用highcharts实现条形图

截至目前我刚刚对x轴和y轴的值进行了硬编码,但我需要动态传递数据,任何人都可以请帮助如何实现,如果你能分享一些有用的链接,可以指导我。



我尝试过:



var chart = Highcharts.chart('container',{



xAxis:{

类别:['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec' ]

},



系列:[{

数据:[29.9,71.5,106.4,129.2, 144.0,176.0,135.6,148.5,216.4,194.1,95.6,54.4]

}]

});



这是我用来硬编码值的例子。

Hi Im implementing bar charts using highcharts in asp.net c# application
as of now I have just hardcoded the values for both x and y axis but I need to pass the data dynamically could anyone please help how to achieve if you can please share some useful links that would guide me.

What I have tried:

var chart = Highcharts.chart('container', {

xAxis: {
categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']
},

series: [{
data: [29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4]
}]
});

this is the example I used to hardcode the values.

推荐答案

查看这篇文章

使用jquery ajax在asp.net中的Highcharts [ ^ ]


这篇关于使用ASP.NET C#中的highcharts将动态值传递到x axix和Y轴以获取条形图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆