highthighcharts加载数据 如何左右滑动图表加载新数据

highcharts两种数据赋值方法为什么第二种无法显示?-问答-最代码
等highcharts两种数据赋值方法为什么第二种无法显示?
&!DOCTYPE HTML&
&meta http-equiv=&Content-Type& content=&text/ charset=utf-8&&
&title&Highcharts Example&/title&
&script type=&text/javascript& src=&jquery.min.js&&&/script&
&script type=&text/javascript&&
var data = [&['DS',23105]&, &['CSS',19778]&,
&['ZDS',4639]&];
var xdata = '['+data.join(&,&)+']';
// data = data.join(&,&);
$(function () {
chart = new Highcharts.Chart({
renderTo: 'container',
plotBackgroundColor: null,
plotBorderWidth: null,
plotShadow: false
text: 'Browser market shares at a specific website, 2010'
tooltip: {
pointFormat: '{series.name}: &b&{point.percentage}%&/b&',
percentageDecimals: 1
plotOptions: {
allowPointSelect: true,
cursor: 'pointer',
dataLabels: {
enabled: true,
color: '#;,
connectorColor: '#;,
formatter: function() {
(this.point.name +&==&+this.point.y);
return '机型:&b&'+ this.point.name +'&/b& 台数:&b&'+this.point.y+'&/b&百分比: '+ this.percentage.toFixed(2) +' %';
series: [{
type: 'pie',
name: 'Browser share',
data : [['DS',23105],['CSS',19778],['ZDS',4639]]
// (xdata);
chart.series[0].setData(xdata);
&script src=&../js/highcharts.js&&&/script&
&script src=&../js/highcharts-more.js&&&/script&
&script src=&../js/modules/exporting.js&&&/script&
&div id=&container& style=&min-width: 400 height: 400 margin: 0 auto&&&/div&
上述描述可以完成展示
&!DOCTYPE HTML&
&meta http-equiv=&Content-Type& content=&text/ charset=utf-8&&
&title&Highcharts Example&/title&
&script type=&text/javascript& src=&jquery.min.js&&&/script&
&script type=&text/javascript&&
var data = [&['DS',23105]&, &['CSS',19778]&,
&['ZDS',4639]&];
var xdata = '['+data.join(&,&)+']';
// data = data.join(&,&);
$(function () {
chart = new Highcharts.Chart({
renderTo: 'container',
plotBackgroundColor: null,
plotBorderWidth: null,
plotShadow: false
text: 'Browser market shares at a specific website, 2010'
tooltip: {
pointFormat: '{series.name}: &b&{point.percentage}%&/b&',
percentageDecimals: 1
plotOptions: {
allowPointSelect: true,
cursor: 'pointer',
dataLabels: {
enabled: true,
color: '#;,
connectorColor: '#;,
formatter: function() {
(this.point.name +&==&+this.point.y);
return '机型:&b&'+ this.point.name +'&/b& 台数:&b&'+this.point.y+'&/b&百分比: '+ this.percentage.toFixed(2) +' %';
series: [{
type: 'pie',
name: 'Browser share',
data : xdata
// (xdata);
chart.series[0].setData(xdata);
&script src=&../js/highcharts.js&&&/script&
&script src=&../js/highcharts-more.js&&&/script&
&script src=&../js/modules/exporting.js&&&/script&
&div id=&container& style=&min-width: 400 height: 400 margin: 0 auto&&&/div&
用上述方式就不行;
两种方法只是赋值方法不同,我下述方式那里不对,求指点!!
所有回答列表(1)
已解决,第二种属于字符串赋值,因此无法展示成功
编程语言基础
数据库开发
客户端开发
服务器软硬件
开源组件类库
暂无贡献等级
暂无贡献等级
暂无贡献等级
暂无贡献等级
扫描二维码关注最代码为好友"/>扫描二维码关注最代码为好友使用Highcharts快速开发报表_百度文库
两大类热门资源免费畅读
续费一年阅读会员,立省24元!
使用Highcharts快速开发报表
上传于||暂无简介
阅读已结束,如果下载本文需要使用
想免费下载本文?
下载文档到电脑,查找使用更方便
还剩19页未读,继续阅读
你可能喜欢

我要回帖

更多关于 highcharts 多个图表 的文章

 

随机推荐