Charts.js直线-我找不到解决方案 [英] charts.js straight lines - i cant find a solution

查看:59
本文介绍了Charts.js直线-我找不到解决方案的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

因此,我正在使用Charts.js http://www.chartjs.org/ 并尝试使两点之间的直线是直的,并且没有任何弯曲的原因。

So im using charts.js http://www.chartjs.org/ and im trying to make the lines between 2 dots be straight and not curvy for no apperent reason.

它现在看起来像是
http://imgur.com/RrdRgAR,N31ajM7#1

看起来像基本代数图应该像上面链接中的其他图片一样看起来像

and i want it to look like basic algebric graphs should look like the other picture in the above link

当前数据集:

                label: "Shop Sales",
                fillColor : "rgba(255, 89, 114, 0.6)",
                strokeColor : "rgba(51, 51, 51, 1)",
                pointColor : "rgba(255, 89, 114, 1)",
                pointStrokeColor : "#fff",
                pointHighlightFill : "#fff",
                pointHighlightStroke : "rgba(151,187,205,1)",
                maintainAspectRatio: false,

window.onload = function(){
    var ctx = document.getElementById("canvas").getContext("2d");

    window.myLine = new Chart(ctx).Line(lineChartData, {
responsive: true, scaleFontColor: "#FF5972" }

)};

谢谢,我在网上到处搜索

thank you, im searching for this on the web everywhere

推荐答案

v2.0似乎已对其进行了更改。现在是 tension:0 。在撰写本文时,文档指出其为 lineTension:0 ,但这似乎是不正确的。

It looks like it's been changed with v2.0. It is now tension:0. As of this writing the docs state it's lineTension:0, but that seems incorrect.

这篇关于Charts.js直线-我找不到解决方案的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆