I would like to get the current width of the chart, I tried something like this:
chart.width
and
$(this).parent().width()
where is the schedule
chart = new Highcharts.Chart({ ... })
But does not work ...
ADDITIONAL INFORMATION
I would like to place an image (helper) to the left of the export buttons (responsive).
At the moment, I have the following code:
$(document).ready(function() {
chart = new Highcharts.Chart({
chart: {
renderTo: 'area1',
type: 'bar',
events: {
load: drawImages,
}
...}
})
})
AND
function drawImages() {
var chart = this;
x = chart.plotRight - 50
chart.renderer.image('/assets/faq.png', x, 0, 20, 20)
.attr({
zIndex: 100,
title: "My title for displaying a tooltip"
})
.css({
cursor: 'pointer'
})
.add();
};
But images are displayed on the left side of the chart (using plotRight).
I know how to get the width of the container div of the graph ("area1"), but I like to have code larger than Object Oriented (because I have at least 5 graphics on the page).
source
share