C#中如何把我的一个数组里的值显示到chart折线图里啊

C#中如何把我的一个数组里的值显示到chart折线图里啊

问题描述:

chart里面的属性不太会设置
每次运行的结果都是一片空白,什么值也没有

替换一下试试

 <script type="text/javascript">

Highcharts.chart('container', {
    chart: {
        type: 'pie',
        options3d: {
            enabled: true,
            alpha: 45,
            beta: 0
        }
    },
    title: {
        text: 'Browser market shares at a specific website, 2014'
    },
    tooltip: {
        pointFormat: '{series.name}: <b>{point.percentage:.1f}%</b>'
    },
    plotOptions: {
        pie: {
            allowPointSelect: true,
            cursor: 'pointer',
            depth: 35,
            dataLabels: {
                enabled: true,
                format: '{point.name}'
            }
        }
    },
    series: [{
        type: 'pie',
        name: 'Browser share',
        data: [
            ['Firefox', 45.0],
            ['IE', 26.8],
            {
                name: 'Chrome',
                y: 12.8,
                sliced: true,
                selected: true
            },
            ['Safari', 8.5],
            ['Opera', 6.2],
            ['Others', 0.7]
        ]
    }]
});
        </script>

说得太简单了,截图,上代码呗

Highcharts.chart('container', {
chart: {
type: 'pie',
options3d: {
enabled: true,
alpha: 45,
beta: 0
}
},
title: {
text: 'Browser market shares at a specific website, 2014'
},
tooltip: {
pointFormat: '{series.name}: {point.percentage:.1f}%'
},
plotOptions: {
pie: {
allowPointSelect: true,
cursor: 'pointer',
depth: 35,
dataLabels: {
enabled: true,
format: '{point.name}'
}
}
},
series: [{
type: 'pie',
name: 'Browser share',
data: [
['Firefox', 45.0],
['IE', 26.8],
{
name: 'Chrome',
y: 12.8,
sliced: true,
selected: true
},
['Safari', 8.5],
['Opera', 6.2],
['Others', 0.7]
]
}]
});

chart里面的属性不太会设置 每次运行的结果都是一片空白,什么值也没有

我想知道谁拿到了20C币?

你用C#开发什么Chart?
第一种办法:你会不会VBA?直接在EXCEL里找一个你要的Chart,然后录制宏,录制完了之后打开VBA,看宏的参数, 一般情况下同类Chart在各种平台下的配置都是通用的。什么角度,值,偏移量之类的。
第二种办法:去找帮助文档,去找Sample,去Google,别Baidu。

chart1.Series[0].Points.AddXY(横坐标值, 纵坐标值); 把里面的替换成你需要的值就可以了