小编Sab*_*bba的帖子

在Chart.js中为Linechart添加第二个Y轴?

我想在线图上添加第二Y-axis个,可能在右侧canvas.我试图用Chart.js取自https://github.com/Wikunia/Chart.js/tree/Double-Y-AxisLineDoubleY定义.但:

  1. 我在Firefox上看不到这个例子:

ReferenceError:xPos未定义Chart.js:1147:7

  1. 如果我Chart.js在我的应用中使用它:

currentChart.addData不是函数

这说:是否有可能以Y-axis另一种方式增加一秒?

linechart chart.js

5
推荐指数
1
解决办法
9549
查看次数

如何在Chartjs中将图像添加为背景?

我在可编程设备上使用chart.js lib,我需要将图像作为背景添加到图表中,如果不可能的话,如何将背景颜色更改为黑色?我不能使用Jquery,因为平台不支持它。

谢谢

background background-image chart.js

3
推荐指数
1
解决办法
7011
查看次数

Chartjs 2.0 alpha,如何为y轴设置静态比例

我正在使用Chart.js 2.0,有时我的系列会"超出规模",所以这个/这些系列在图表上看不到.所以我决定有固定的比例.我发现文件:

// Object - if specified, allows the user to override the step generation algorithm.
//          Contains the following values
//              start: // number to start at
//              stepWidth: // size of step
//              steps: // number of steps
Run Code Online (Sandbox Code Playgroud)

我试过了:

{
 type: "linear", // only linear but allow scale type registration. This allows extensions to exist solely for log scale for instance
 display: true,
 position: "right",
 id: "y-axis-2",
  // grid line settings
 gridLines: {
      show: true,
      ( ... ) …
Run Code Online (Sandbox Code Playgroud)

linechart chart.js

1
推荐指数
1
解决办法
6393
查看次数