0

I have created a chart using YUI and want to display axis labels. The x axis is fine, but the y axis label appears inside of the data.

Here is what is happening:

10     |
 9     |
 8     |
 7  l  |
 6  a  |
 5  b  |        CHART
 4  e  |
 3  l  |
 2     |
 1     | 
 0     |_____________________________

Here is what I want to happen:

  10   |
   9   |
   8   |
l  7   |
a  6   |
b  5   |        CHART
e  4   |
l  3   |
   2   |
   1   | 
   0   |_____________________________

Here is my code for the chart axes:

    var chartaxes = {
            timeelapsed:{
                position:"bottom",
                type:"category",
                title:"label"
            },
            kWh:{

                position:"left",
                type:"numeric",
                title:"label",
            }
    };

Is there any way to fix this?

4

1 に答える 1

0

keys変数を使用してタイトルを正しく表示するには、軸に関連付けられているシリーズを設定する必要があります。

var chartaxes = {
    timeelapsed:{
        position:"bottom",
        type:"category",
        title:"Time Elapsed (minutes)",
        keys: ["category"],

等々。

于 2013-07-19T20:02:51.000 に答える