Asp.net 将轴数据添加到highchart

Asp.net 将轴数据添加到highchart,asp.net,highcharts,Asp.net,Highcharts,我正在使用highcharts沿着x和y轴绘制图形,使用以下代码 DotNet.Highcharts.Highcharts chart = new DotNet.Highcharts.Highcharts("chart"); chart.SetTitle(new Title { Text = "Segment Pressure Points" }); chart.SetXAxis(new XAxis { Title = new XAxisTitle

我正在使用highcharts沿着x和y轴绘制图形,使用以下代码

        DotNet.Highcharts.Highcharts chart = new DotNet.Highcharts.Highcharts("chart");
        chart.SetTitle(new Title { Text = "Segment Pressure Points" });
        chart.SetXAxis(new XAxis { Title = new XAxisTitle { Text = "Kilometers" }, Min = 0, MinRange = 14 * 20 });
        chart.SetYAxis(new YAxis { Title = new YAxisTitle { Text = "db" }, Min = 0, MinRange = 0.6 * 1 });
        chart.SetSeries(new Series { Name = "Fiber No:1",Data=new Data(new     object[]{20,50,89,158,190}),YAxis="0"});
我想在图形的x轴和y轴的给定值上添加点,目前我使用的是上述setseries方法,但它只是针对y轴而不是x轴绘制点。如何绘制具有两个轴值的点?

试试这个

chart.setSeries(new Series {Name = "Fiber No:1", Data new Data(new Object[]{{x:0, y:20},{x:2, y:50},{x:7, y:89},{x:9, y:158},{x:10, y:190},})}), yAxis = 0});
您可以按照x值的任意顺序

如果按x值的升序排列,则将生成一个平滑的图表
可能会有间隙(这种类型的数据会生成不规则的间隔图,而您提供的数据会生成规则的间隔图)。

尝试按对象回复您的每个点,包括x/y值,我的意思是,每个点的形式应为:{x:3,y:20}等。您有没有在JSFIDLE或代码笔中试用过的示例。你可以和我们分享。这将是有用的解决方法,因为缺少这个新系列{Name=“Fiber No:24”,Data=newdata(新对象[,]{0,0},{segment_length.Text,0}})}