0

対数の値は常に対数の累乗であるべきだと聞きました。ハイチャートの対数軸デモで遊んでいました http://jsfiddle.net/jjg4z79x/

yaxisminの値を 9に設定しました。これにより、対数軸 4、10、20、40、100、200、400、1K のラベルに予期しない値が表示されます

予想されるラベル: 10、100、...

説明: y 軸スケールの最小値は 9 です。ただし、ラベルと目盛りは対数底の次の整数乗で表示する必要があります。つまり、10 です。同様に、他のすべてのラベルは対数底の整数乗でなければなりません。つまり10 power 1, 10 power 2、などです。

これは対数軸の正しい動作ですか?

4

1 に答える 1

0

You might confuse axis scale with labels displaying.

In fact, you can set the labels to be displayed in whatever value you want ( but greater than 0) with tickPositions/tickPositioner. Logarithmic axis means that the scale in a chart is logarithmic but it does not determine how labels are displayed.

 yAxis: {
  type: 'logarithmic',
  min: 9,
  startOnTick: false,
  endOnTick: false,
  tickPositions: [Math.log10(10), Math.log10(20), Math.log10(32), Math.log10(40)]
},

example: http://jsfiddle.net/gu3ogj13/

于 2016-12-27T18:18:53.687 に答える