DOJO图表:为每个chart.addSeries()在y轴上添加中间标签

时间:2014-12-26 08:36:07

标签: graph charts dojo axis-labels

我添加了2个chart.addSeries()及其即将推出,但我需要标签也应该显示

      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 })
   --------------------

1 个答案:

答案 0 :(得分:0)

你的系列都使用了一些名为"其他"但我不会在你的片段中看到它的定义。 尝试将您定义的地图重命名为"其他"。另外我相信你必须设置labelStyle属性。