views:

13

answers:

0

Trying to get tooltips to show for a clustered bar chart when highlighting a row to no avail. Cope below... look at the c.addSeries call:

    <script type="text/javascript">
      dojo.require("dojox.charting.Chart2D");
      dojo.require("dojox.charting.plot2d.ClusteredBars");
      dojo.require("dojox.charting.action2d.Highlight");
      dojo.require("dojox.charting.action2d.MoveSlice");
      dojo.require("dojox.charting.action2d.Tooltip");
      dojo.require("dojox.charting.themes.MiamiNice");
      dojo.require("dojox.charting.widget.Legend");
      dojo.require("dojox.charting.themes.PlotKit.blue");
      dojo.require("dojox.charting.action2d.Magnify");
      dojo.require("dojox.charting.action2d.Shake");
      dojo.require("dojo.colors");
      dojo.require("dojo.fx.easing");

dojo.addOnLoad(function() {
      var c = new dojox.charting.Chart2D("theChart");
 c.addAxis("x", 
  {
   fixLower: "major", 
   fixUpper: "major", 
   includeZero: true,
   labels: [ {value:10, text: "10%"}, 
       {value:20, text: "20%"},
       {value:30, text: "30%"},
       {value:40, text: "40%"}, 
       {value:50, text: "50%"}, 
       {value:60, text: "60%"},
       {value:70, text: "70%"}, 
       {value:80, text: "80%"}, 
       {value:90, text: "90%"},
       {value:100, text: "100%"}
     ]
  }
 );
 c.addAxis("y", 
  {
   vertical: true, 
   fixLower: "minor", 
   fixUpper: "minor",
   natural: true,
   labels: [ {value:0, text: ""}, 
       {value:1, text: "Test 1"}, 
       {value:2, text: "Test 2"},
       {value:3, text: "Test 3"}, 
       {value:4, text: "Test 4"}, 
       {value:5, text: "Test 5"},
       {value:6, text: "Test 6"}, 
       {value:7, text: "Test 7"}, 
       {value:8, text: "Test 8"},
       {value:9, text: "Test 9"}
      ]
  }
 );
 c.addPlot("default", 
  {
   type: "ClusteredBars",
   gap: 5
  }
 );
 c.addSeries("Series A", 
  [{y:10, tooltip: "Yes"}], 
  {stroke: {color: "red"},
  fill: "lightpink"}

 );
 c.addSeries("Series B", 
  [100, 90],
  {stroke: {color: "blue"},
  fill: "lightblue"}
 );
 c.render();
      }); 
</script>

Thanks!