Dojox.charting 如何为折线图添加自定义工具提示-DOJO

Dojox.charting 如何为折线图添加自定义工具提示-DOJO,dojox.charting,Dojox.charting,我无法为类型:'Lines'图表添加自定义工具提示,就像我为clusturedbar和饼图所做的那样。 这是我正在使用的代码 makeCharts = function(){ var chart1 = new dojox.charting.Chart2D("simplechart"); chart1.addPlot("default",{ type: 'Lines', markers: true,

我无法为
类型:'Lines'
图表添加自定义工具提示,就像我为clusturedbar和饼图所做的那样。 这是我正在使用的代码

    makeCharts = function(){

    var chart1 = new dojox.charting.Chart2D("simplechart");
    chart1.addPlot("default",{
                 type: 'Lines',
                 markers: true,
                 tension: 'S',
                 lines: true,
                 areas: false,
                 labelOffset: -30,
                 labels:true,
                 shadows: { dx:10, dy:12, dw:12 }
    });
    chart1.addAxis("x");
    chart1.addAxis("y", {vertical: true});
    chart1.addSeries("Series 1", [{y:1, tooltip:'bla bla'}, 
                                          {y:2, tooltip:'bla bla'}, 
                                          {y:2, tooltip:'bla bla'}, 
                                          {y:3, tooltip:'bla bla'}, 
                                          {y:4, tooltip:'bla bla'}, 
                                          {y:5, tooltip:'bla bla'}, 
                                          {y:5, tooltip:'bla bla'}, 
                                          {y:7, tooltip:'bla bla'}]
            );
    new dojox.charting.action2d.Magnify(chart1, 'default');
        new dojox.charting.action2d.Tooltip(chart1, 'default');
    chart1.render();
};

dojo.addOnLoad(makeCharts);
注意:如果我在add系列
({y:1,工具提示:'blablabla'})
中使用json表示法,即使是图表也不会显示出来。只有当我给出
addseries('series 1',[1,2,2,3,4,5,5,6])时,图表才会出现
有谁能告诉我,在我的代码中,获取自定义工具提示的错误是什么


提前谢谢

我试着为Dojo折线图做这件事——不得不改成x,y图表,因为看起来折线图只需要一组数字。这个例子帮助了我-

x:和y:以及工具提示:的数组有效

{x: 1, y: 2, tooltip: "hello"}, {...}
如果你像我一样希望x是一组日期或其他非数字标记,那么只需添加->

chart1.addAxis("x", {
labels: [
    {value: 0, text: "20110901"},
    {value: 1, text: "20110902"},
    {value: 2, text: "20110903"},
    ... etc
],
rotation: 90})

我试着为一个Dojo折线图做这件事——不得不改成一个x,y图表,因为看起来折线只需要一个数字数组。这个例子帮助了我-

x:和y:以及工具提示:的数组有效

{x: 1, y: 2, tooltip: "hello"}, {...}
如果你像我一样希望x是一组日期或其他非数字标记,那么只需添加->

chart1.addAxis("x", {
labels: [
    {value: 0, text: "20110901"},
    {value: 1, text: "20110902"},
    {value: 2, text: "20110903"},
    ... etc
],
rotation: 90})