Home Forums Chart Support Whole canvas as a hyperlink Reply To: Whole canvas as a hyperlink

#9491

Use onclick to make whole canvas to be linked to another page/ url as shown below,
<div id="chartContainer" onclick="redirect()"></div>
then add a function “redirect” to your javascript code, which will contain a link to another page/ url

function redirect()
{
    window.location = "https://canvasjs.com/" ;// loads webpage in the current tab
    // window.open = "https://canvasjs.com/" ;// loads webpage in the new tab
}