- Version 3.18.1
- Environment production
- Database mysql
- Mail SMTP
- Theme Casper, Version 3.0.12
I’m trying to embed some Plotly graphs into my blog pages. It works really nicely with injecting some Javascrip code into the certain Ghost blog page and also loading the plotly.js min library in the <head>
section of the same page.
However, it seems that the Plotly buttons are decorated with my basic settings for URL tags, like a black underscore which becomes blue while hover over. This is the default behaviour of my theme I guess.
Please see the screenshot above, I hope the decoration is evident.
How to override this basic styling in my custom HTML block as below:
<div id="myDiv" style="width:100%;height:450px;"></div>
and the Javascript which generates the 3D graph is this:
<script>
Plotly.d3.csv('https://raw.githubusercontent.com/plotly/datasets/master/api_docs/mt_bruno_elevation.csv', function(err, rows){
function unpack(rows, key) {
return rows.map(function(row) { return row[key]; });
}
var z_data=[ ]
for(i=0;i<24;i++)
{
z_data.push(unpack(rows,i));
}
var data = [{
z: z_data,
type: 'surface'
}];
var layout = {
title: 'Mt Bruno Elevation',
autosize: false,
width: 500,
height: 500,
margin: {
l: 65,
r: 50,
b: 65,
t: 90,
}
};
Plotly.newPlot('myDiv', data, layout);
});
</script>
By default the Plotly plot buttons should be without underscore. (I’m sorry that I can’t place another image for better understanding, as I am new to Ghost forum.)