Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>You can customize you mouse over by using tooltip in your data. For example:</p> <p>In require statment, add "dojox/charting/action2d/Tooltip" In your chart data add 'tooltip' with text to display on mouse over</p> <p>JSON chart data:</p> <pre><code>var chartdata = [{x: 8,y:"0",tooltip:"What to show during mouse over"}]; </code></pre> <p>JS code to use tooltip in your chart data:</p> <pre><code>// Create the tooltip which will show during mouse over var tip = new Tooltip(chart,"default"); // Render the chart! chart.render(); </code></pre> <p>That is all you need...Not sure about your second question...</p> <p>This is easy stuff, visit this charting example page: <a href="http://dojotoolkit.org/documentation/tutorials/1.8/charting/" rel="nofollow">http://dojotoolkit.org/documentation/tutorials/1.8/charting/</a></p> <p>Using your existing example, here is how you add mouse over:</p> <pre><code>require(["dojo/ready", "dojox/charting/Chart2D","dojox/charting/themes/Claro","dojox/charting/action2d/Tooltip",], function(ready, Chart,ClaroTheme,Tooltip) { ready(function() { var mychart = Chart("mychart"); mychart.title = "My Chart"; mychart.titleFont = "tahoma"; mychart.addPlot("line_plot", { type: "Lines", lines: true, areas: false, markers: true }); mychart.addPlot("column_plot", { type: "Columns", lines: true, areas: false, markers: true }); mychart.addAxis("x", { vertical: false }); mychart.addAxis("y", { vertical: true }); var column_data = [{y:1,x:1,tooltip: "column 1"}, {y: 3,x:2,tooltip: "column 2"}, {y:5,x:3,tooltip: "column 3"}, {y:2,x:4,tooltip: "column 4"}, {y:6,x:5,tooltip: "columnt 5"}, {y:1,x:6,tooltip: "column 6"}, {y:0,x:7,tooltip: "column 7"}, {y:4,x:8,tooltip: "column 8"}, {y:6,x:9,tooltip: "column 9"}, {y:4,x:10,tooltip: "column 10"}, {y:1,x:11,tooltip: "column 11"}]; var bar_data = [{y:1,x:1,tooltip: "bar 1"}, {y: 3,x:2,tooltip: "bar 2"}, {y:5,x:3,tooltip: "bar 3"}, {y:2,x:4,tooltip: "bar 4"}, {y:6,x:5,tooltip: "bar 5"}, {y:1,x:6,tooltip: "bar 6"}, {y:0,x:7,tooltip: "bar 7"}, {y:4,x:8,tooltip: "bar 8"}, {y:6,x:9,tooltip: "bar 9"}, {y:4,x:10,tooltip: "bar 10"}, {y:1,x:11,tooltip: "bar 11"}]; mychart.addSeries("line_series", bar_data, { plot: "line_plot" }); mychart.addSeries("column_series", column_data, { plot: "column_plot" }); mychart.setTheme(ClaroTheme); var tip = new Tooltip(mychart,"line_plot"); var tip1 = new Tooltip(mychart,"column_plot"); mychart.render(); }); }); </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload