Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Just tried styling the <a href="http://demos.kendoui.com/dataviz/bar-charts/index.html" rel="nofollow">Kendo UI bar chart demo</a> with CSS; both turning the cursor into a hand and leaving it the default cursor on text <a href="http://jsfiddle.net/YK2VU/" rel="nofollow">works quite well</a>. I just had to add two lines of CSS (and change the script/CSS URLs):</p> <pre><code>&lt;html&gt; &lt;head&gt; &lt;title&gt;&lt;/title&gt; &lt;script src="http://code.jquery.com/jquery-1.8.2.min.js"&gt;&lt;/script&gt; &lt;script src="http://cdn.kendostatic.com/2012.3.1114/js/kendo.all.min.js"&gt;&lt;/script&gt; &lt;link href="http://cdn.kendostatic.com/2012.3.1114/styles/kendo.common.min.css" rel="stylesheet" /&gt; &lt;link href="http://cdn.kendostatic.com/2012.3.1114/styles/kendo.default.min.css" rel="stylesheet" /&gt; &lt;style type="text/css"&gt; /* When hovering over a bar, Kendo dynamically adds a bar as the last child of the SVG element that works as an overlay. So, effectively, we're hovering over the last (dynamically added) child */ svg &gt; path:last-child {cursor:pointer;} svg {cursor:default} &lt;/style&gt; &lt;/head&gt; &lt;body&gt; &lt;div id="example" class="k-content"&gt; &lt;div class="chart-wrapper"&gt; &lt;div id="chart" style="background: center no-repeat url('../../content/shared/styles/world-map.png');"&gt;&lt;/div&gt; &lt;/div&gt; &lt;script&gt; function createChart() { $("#chart").kendoChart({ theme: $(document).data("kendoSkin") || "default", title: { text: "Internet Users" }, legend: { position: "bottom" }, chartArea: { background: "" }, seriesDefaults: { type: "bar" }, series: [{ name: "World", data: [15.7, 16.7, 20, 23.5, 26.6] }, { name: "United States", data: [67.96, 68.93, 75, 74, 78] }], valueAxis: { labels: { format: "{0}%" } }, categoryAxis: { categories: [2005, 2006, 2007, 2008, 2009] }, tooltip: { visible: true, format: "{0}%" } }); } $(document).ready(function() { setTimeout(function() { // Initialize the chart with a delay to make sure // the initial animation is visible createChart(); $("#example").bind("kendo:skinChange", function(e) { createChart(); }); }, 400); }); &lt;/script&gt; &lt;/div&gt; &lt;script type="text/javascript"&gt; console.log("hi") document.addEventListener("click",function(e){document.write(e.target)},false) &lt;/script&gt; &lt;/body&gt; &lt;/html&gt;​ </code></pre> <p>If you have multiple charts and want this behavior only for some charts, I'd suggest using classes, like</p> <pre><code>&lt;div id="barChart" class="bargraph cursorPointer"&gt;&lt;/div&gt; </code></pre> <p>And change the CSS like</p> <pre><code>.cursorPointer svg &gt; path:last-child {cursor:pointer;} .cursorPointer svg {cursor:default} </code></pre> <p>(If you want the arrow cursor on text of all graphs, omit the <code>.cursorPointer</code> on the second line.)</p>
 

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