2014-12-26 74 views
0

我加入2個chart.addSeries()和其未來各chart.addSeries(),但我需要的標籤也應該得到顯示道場圖表:在y軸加上中間標籤

 chart.addPlot("default", { 
    type: "Lines", 
    labels: true, 
    markers: true , 
    htmlLabels: true 
    }); 
    // Add X axis 
    chart.addAxis("x",{ labels:[{"value":1,"text":"0M"},{"value":1.5,"text":"15M"},{"value":2,"text":"2mmM"},{"value":3,"text":"4M"},{"value":4,"text":"6M"},{"value":5,"text":"8M"},{"value":6,"text":"10M"},{"value":7,"text":"12M"}]}); 
    // Add Y axis 
    chart.addAxis("y", { min: 50, max: 200, vertical: true, fixLower: "major", fixUpper: "major" }); 
    ADDING SERIES - HERE I WANT THE LABEL ALSO DISPALYED FOR THESE 2 SERIES 
    chart.addSeries("Series A", [110, 110, 110, 110, 110, 110, 110], {plot: "other", stroke: {color: "blue", width: 1.5, style:"ShortDash"},outline: null }) 
    chart.addSeries("Series B", [130, 130, 130, 130, 130, 130, 130], {plot: "other",stroke: {color: "blue", width: 1.5, style:"ShortDash"},outline: null }) 
    -------------------- 

回答

0

您的系列劇都使用了一些名爲「其他」的情節,但我沒有看到它在您的片段中定義。 嘗試重命名您已定義爲「其他」的情節。另外我相信你必須設置labelStyle屬性。