Dojox制图。无法更改鼠标指示器的指示器线条样式

Dojox制图。无法更改鼠标指示器的指示器线条样式,dojo,dojox.charting,Dojo,Dojox.charting,我正在尝试使用Dojox图表创建图表。我创建了绘图并添加了系列 this.addPlot("st", {type: Lines, markers: false, tension:"X"}); this.addSeries("Series A", [{x:0, y:0}, {x:5, y:10}, {x:10, y:12}, {x:15, y:14}, {x:20, y:15}, {x:25, y:16

我正在尝试使用Dojox图表创建图表。我创建了绘图并添加了系列

this.addPlot("st", {type: Lines, markers: false, tension:"X"});

this.addSeries("Series A",
               [{x:0, y:0}, {x:5, y:10},
                {x:10, y:12}, {x:15, y:14},
                {x:20, y:15}, {x:25, y:16},
                {x:30, y:18}],
               {plot: "st"});
然后我添加了鼠标指示器

new MouseIndicator (this, "st",
             {series: "Series A",
              labels: false,
              mouseOver: true,
              lineStroke: { color: "blue" }   
             });
因此,它添加了指示器,但带有默认颜色。 尝试使用线条笔划、线条轮廓或线条阴影更改指示器。没有什么变化

根据API文档,应更改线条样式^


有人知道如何改变鼠标指针的线条样式吗?

以下是我的解决方案

使用dojo/aspect()侦听MouseIndicator对象的“_onMouseSingle”,并在该事件发生后更改标记和线条笔划颜色:

var mouseHoverIndicator = new MouseIndicator (this, "st",{
        series: "Series A",
        labels: false,
        mouseOver: true,
        lineStroke: { color: "blue" }   
    });

aspect.after(mouseHoverIndicator, "_onMouseSingle", function (value) {
    var plot = mouseHoverIndicator.chart.getPlot(mouseHoverIndicator._uName);
    plot.opt.markerStroke=  {color:"blue"};
    plot.opt.lineStroke= {color:"blue"};
    plot.dirty = true;
    mouseHoverIndicator.chart.render();
});

这是我的破解方案

使用dojo/aspect()侦听MouseIndicator对象的“_onMouseSingle”,并在该事件发生后更改标记和线条笔划颜色:

var mouseHoverIndicator = new MouseIndicator (this, "st",{
        series: "Series A",
        labels: false,
        mouseOver: true,
        lineStroke: { color: "blue" }   
    });

aspect.after(mouseHoverIndicator, "_onMouseSingle", function (value) {
    var plot = mouseHoverIndicator.chart.getPlot(mouseHoverIndicator._uName);
    plot.opt.markerStroke=  {color:"blue"};
    plot.opt.lineStroke= {color:"blue"};
    plot.dirty = true;
    mouseHoverIndicator.chart.render();
});