0
我剛剛創建了一個簡單的Chart2d,關於這個圖表(數據系列顯示正常,主題是好的等),一切都ok了,所以我剛剛移動並試圖將Tooltip和Legend功能添加到此圖表。於是我想出了下面的代碼:現在道場表 - 圖例和工具提示顯示沒有風格/主題
require([
"dojox/charting/Chart",
"dojox/charting/action2d/Tooltip",
"dojox/charting/themes/Tom",
"dojox/charting/widget/SelectableLegend",
"dojox/charting/plot2d/Lines",
"dojox/charting/plot2d/Markers",
"dojox/charting/axis2d/Default",
"dojo/store/JsonRest",
"dojo/store/Memory",
"dojo/store/Cache",
"dojox/charting/StoreSeries",
"dojo/domReady!"
], function(Chart, Tooltip, Tom, SelectableLegend, LinesPlot, JsonRest, StoreSeries){
// ... the data store is initialed here ..
chart.setTheme(Tom);
chart.addPlot("default", {
type: LinesPlot,
markers: true
});
.
.
.
chart.render();
var tip = new Tooltip(chart, "default");
var leg = new dojox.charting.widget.SelectableLegend({ chart: chart, horizontal: true }, "legend1");
});
,問題是,我可以看到這兩個傳奇/工具提示此圖表,但似乎圖表主題並不適用於他們。