dojox.gfxにはまだ対数軸がありません。
更新:これを行う1つの方法は、対数軸に沿ってデータを再マップし、カスタムラベルで線形軸を使用することです。例えば:
// we will transform our 'x' to a decadic logarithmic scale
var LOG10 = Math.log(10);
var data = [...]; // my data of {x, y}
var transformedData = dojo.map(data, function(value){
return {
x: Math.log(value.x) / LOG10,
y: value.y // 'y' is unchanged
};
});
// ...
// add the axis and the data
chart.addAxis("x", {
natural: true,
includeZero: true,
// our logarithmic labels
labels: [
{value: 0, text: "1"},
{value: 1, text: "10"},
{value: 2, text: "100"},
{value: 3, text: "1000"},
{value: 4, text: "10^4"},
{value: 5, text: "10^5"},
{value: 6, text: "10^6"},
{value: 7, text: "10^7"},
{value: 8, text: "10^8"},
{value: 9, text: "10^9"}
]
});
chart.addSeries("my data", transformedData);
// ...
そのような何かがトリックを行います。もう1つのオプションは、ラベリング機能を使用して「対数」ラベルを自動的に生成することです。