使用 jQuery 图表的曲线

Curved Lines Using jQuery Flot Chart

我目前有一个图表,它是一个非常简单的折线图。尝试使用 CurvedLines 插件使曲线平滑,但点没有变圆。

我的代码在这里:

var d = [[2010, ], [2011, 0], [2012, 1000], [2013, 835000], [2014, 5100000], [2015, 15300000], [2016, 33400000], [2017, ]];


    var data1 = [{data: d, color: "#0086e5", points: { symbol: "circle", fillColor: "#ffffff", radius: 5 }, lines: {show: true}, points: {show: true}, curvedLines: {apply: true, monotonicFit: true}}];

    var options = {
             series: {
                 curvedLines: {active: true}                    
             }
          };

          /*series: {
            lines: { show: true },
            points: { show: true },
            curvedLines: {active: true}         
        },*/

    $.plot("#homechart",data1, {            

        xaxis: {
          tickColor: '#def2ff',
          tickDecimals: 0

        },

        yaxis: {
          tickLength: 0,
          show: false
        },
        grid: {
            backgroundColor: { colors: [ "#effaff", "#d7f3ff" ] },
            borderWidth: 0
        }

        });

        var ticklabel = $('.tickLabel');
        ticklabel.each(function(index, domElement) {
        var $element = $(domElement);

        if ($element.text() === "2010") {
            $element.hide();
        }

        if ($element.text() === "2017") {
            $element.hide();
        }
}, options);

图表已生成,但没有圆角曲线。

绘图调用的选项缺少

series: {
    curvedLines: {active: true}                    
}

(x 轴为 min/max-value)。

添加后,它起作用了:https://jsfiddle.net/khwc415t/