You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I basically have the same problem as #15: I just want to display plots without the user interaction.
I found the staticPlot option, but the problem is that it also disable the tips for the bar plot I'm working on (see code and screenshot below). However, when I apply the staticPlot: true to a pie bar, I still have those popup tips.
So is there a way to have staticPlot: true AND the hover tips for bar plot?
The screenshot below shows the project I'm working on, with the bar plot on the left, and the pie plot on the right.
We can see the tips I'm talking about on the left plot (where it says male 26, and female 42).
Those are important things to show, even with staticPlot: true, because otherwise there is no way to get the precise value foreach bar of the plot.
My js code for those bars is below:
<imgwidth="1072"alt="Screenshot 2019-05-22 at 13 35 16"src="https://user-images.githubusercontent.com/223667/58172081-dbbccc00-7c97-11e9-8b31-0bc8c7784bff.png">
//----------------------------------------
// WEEK DAY MALE FEMALE DISTRIBUTION
//----------------------------------------
var trace1 = {x: [20,14,23,26,13,61,51],y: ['Monday','Tuesday','Wednesday','Thursday','Friday','Saturday',"Sunday"],name: 'Male',orientation: 'h',marker: {color: '#36acec',width: 1},type: 'bar'};
var trace2 = {x: [12,18,29,42,20,75,64],y: ['Monday','Tuesday','Wednesday','Thursday','Friday','Saturday',"Sunday"],name: 'Female',orientation: 'h',type: 'bar',marker: {color: '#d74747',width: 1}};
var data2 = [trace1, trace2];
var layout2 = {title: 'Daily Traffic',showlegend: true};
var config2 = {responsive: true,displayModeBar: false,// staticPlot: true,};
Plotly.newPlot('plot-2', data2, layout2, config2);
//----------------------------------------
// MOBILE DISTRIBUTION
//----------------------------------------
var data3 = [{values: [34.2,20,15,14,16.8],labels: ['IOS','Android','Blackberry','Symbian',"Others"],type: 'pie'}];
var layout3 = {title: "Mobile Traffic"};
var config3 = {responsive: true,displayModeBar: false,staticPlot: true,};Plotly.newPlot('plot-mobile-traffic',data3,layout3,config3);
The text was updated successfully, but these errors were encountered:
I just want to display plots without the user interaction.
So is there a way to have staticPlot: true AND the hover tips for bar plot?
By use interaction, I suspect you're referring to zoom/pan on drag motion. It sounds like you still want hover to be enable. If so, try setting fixedrange: true in the axes, see -> https://codepen.io/etpinard/pen/qGpXLj
However, when I apply the staticPlot: true to a pie bar, I still have those popup tips.
I basically have the same problem as #15: I just want to display plots without the user interaction.
I found the staticPlot option, but the problem is that it also disable the tips for the bar plot I'm working on (see code and screenshot below). However, when I apply the staticPlot: true to a pie bar, I still have those popup tips.
So is there a way to have staticPlot: true AND the hover tips for bar plot?
The screenshot below shows the project I'm working on, with the bar plot on the left, and the pie plot on the right.
We can see the tips I'm talking about on the left plot (where it says male 26, and female 42).
Those are important things to show, even with staticPlot: true, because otherwise there is no way to get the precise value foreach bar of the plot.
My js code for those bars is below:
The text was updated successfully, but these errors were encountered: