简体   繁体   English

如何从Highcharts折线图中删除趋势线

[英]How to remove trend line from Highcharts Line Chart

I have a Highcharts line chart and I need to remove the trend line that constantly appears. 我有一个Highcharts折线图,我需要删除不断出现的趋势线。 Is this a setting that I can disable? 这是我可以禁用的设置吗?

在此处输入图片说明

An example of the code you're using would help. 您正在使用的代码示例将有所帮助。

This Fiddle has an example of a chart with no trendline. 小提琴有一个没有趋势线的图表示例。

Html HTML

<script src="https://code.highcharts.com/highcharts.js"></script>
<script src="https://code.highcharts.com/modules/exporting.js"></script>

<div id="container" style="min-width: 310px; height: 400px; margin: 0 auto"></div>

Javascript Java脚本

$(function () {
    $('#container').highcharts({
        xAxis: {
            min: -0.5,
            max: 5.5
        },
        yAxis: {
            min: 0
        },
        title: {
            text: 'Scatter plot'
        },
        series: [ {
            type: 'scatter',
            name: 'Observations',
            data: [1, 1.5, 2.8, 3.5, 3.9, 4.2],
            marker: {
                radius: 4
            }
        }]
    });
});

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM