0

I'm migrating a project from ASP Classic to ASP.Net and I was planning to upgrade our Dojo Framework while I am at it. One aspect of the project uses a line chart with two y-axes to display information. The user can toggle a MouseIndicator to provide a tooltip for either line. This worked fine in Dojo 1.8 but it seems to be broken in Dojo 1.9 and on. I say 'seems' because it's possible I'm missing something that the newer version requires.

An example fiddle of the issue is below. If you click on the chart to show the indicator you'll notice the marker is displaying against the 'default' plot (the left y-axis) even though I have declared the indicator using 'plot2'. If you change the framework to 1.8, it works as expected.

http://jsfiddle.net/L19mmy34/3/

<div id="chartOne" style="width: 400px; height: 400px;"></div>

<script>
require(["dojox/charting/Chart", 
     "dojox/charting/themes/Claro",
     "dojox/charting/axis2d/Default", 
     "dojox/charting/plot2d/Lines",
     "dojox/charting/action2d/MouseIndicator",
     'dojox/charting/action2d/MouseZoomAndPan',
     "dojo/ready"],
     function(Chart, Claro, Default, Lines, Indicator, ZoomAndPan, ready){
         ready(function(){
         var chart1 = new Chart("chartOne");
         chart1.addPlot("default", {type: Lines, hAxis: 'x', vAxis: 'y'});
         chart1.addPlot("plot2", {type: Lines, hAxis: 'x', vAxis: 'y2'});

         chart1.addAxis('x', { 
             natural: true, title: 'Elapsed Minutes', titleOrientation: 'away' });
         chart1.addAxis('y', { gap: 10, vertical: true });
         chart1.addAxis('y2', { gap: 10, vertical: true, leftBottom: false });

         chart1.addSeries("Series 1", [-5, 1, 2, 2, 3, 4, 5, 5, 7]);
         chart1.addSeries("Series 2", 
             [-1, -2, -3, -4, -5, -5, -6, -7], {plot: 'plot2'});  

         var mouse = Indicator(chart1, "plot2", {series: "Series 2", marker: true});
         var zoom = ZoomAndPan(chart1, 'default');
         chart1.setTheme(Claro);
         chart1.render();
     });
});
</script>

Is this a bug that's made it through two releases or am I missing some new module?

1 Answer 1

-1

You've correctly 'required' MouseIndicator and MouseZoomAndPan for defining function, however the Class names used in function argument and function body need to changed:

ZoomAndPan -> MouseZoomAndPan Indicator -> MouseIndicator

1
  • Unfortunately, that doesn't fix the issue for me. If you change the class names in the example fiddle that I linked and re-run it, it still exhibits the same issue until it is resized. Does it correct the issue for you in the example fiddle?
    – OttPrime
    Commented Feb 16, 2015 at 16:38

Not the answer you're looking for? Browse other questions tagged or ask your own question.