Okay so i have the following code:
var element = document.getElementById(scope.changeid);
function getData(division,redraw) {
var employeeData = [];
According to a Plotly community moderator (see the first answer here), Plotly.restyle
is faster than Plotly.redraw
and Plotly.newPlot
.
Example taken from the link:
var data = [{
x: ['VALUE 1'], // in reality I have more values...
y: [20],
type: 'bar'
}];
Plotly.newPlot('PlotlyTest', data);
function adjustValue1(value)
{
Plotly.restyle('PlotlyTest', 'y', [[value]]);
}