Spaces:
Runtime error
Runtime error
<html> | |
<head> | |
<meta charset="utf-8" /> | |
<script | |
src="https://cdn.plot.ly/plotly-2.20.0.min.js" | |
charset="utf-8" | |
></script> | |
</head> | |
<body> | |
<div> | |
<script type="text/javascript"> | |
window.PlotlyConfig = { MathJaxConfig: "local" }; | |
</script> | |
<script src="projectdata.js"></script> | |
<div id="myPlot"></div> | |
<script type="text/javascript"> | |
window.PLOTLYENV = window.PLOTLYENV || {}; | |
Plotly.newPlot( | |
"myPlot", | |
projectData, | |
{ | |
coloraxis: { showscale: true }, | |
height: 500, | |
hovermode: "x unified", | |
legend: { | |
bgcolor: "rgba(17,17,17,0)", | |
bordercolor: "rgba(17,17,17,0)", | |
borderwidth: 2, | |
font: { color: "black", size: 14 }, | |
itemsizing: "constant", | |
title: { font: { color: "black" }, text: " " }, | |
tracegroupgap: 0, | |
traceorder: "normal", | |
x: 0, | |
xanchor: "auto", | |
y: 1, | |
yanchor: "auto", | |
}, | |
margin: { b: 0, l: 0, pad: 2, r: 0, t: 0 }, | |
scene: { | |
camera: { | |
center: { x: -0.4, y: 0, z: 0 }, | |
eye: { x: 0.4, y: -1.58, z: 0.3 }, | |
}, | |
domain: { x: [0.0, 1.0], y: [0.0, 1.0] }, | |
xaxis: { title: { text: "" } }, | |
yaxis: { title: { text: "" } }, | |
zaxis: { title: { text: "" } }, | |
}, | |
template: { | |
data: { | |
bar: [ | |
{ | |
error_x: { color: "#2a3f5f" }, | |
error_y: { color: "#2a3f5f" }, | |
marker: { | |
line: { color: "white", width: 0.5 }, | |
pattern: { | |
fillmode: "overlay", | |
size: 10, | |
solidity: 0.2, | |
}, | |
}, | |
type: "bar", | |
}, | |
], | |
barpolar: [ | |
{ | |
marker: { | |
line: { color: "white", width: 0.5 }, | |
pattern: { | |
fillmode: "overlay", | |
size: 10, | |
solidity: 0.2, | |
}, | |
}, | |
type: "barpolar", | |
}, | |
], | |
carpet: [ | |
{ | |
aaxis: { | |
endlinecolor: "#2a3f5f", | |
gridcolor: "#C8D4E3", | |
linecolor: "#C8D4E3", | |
minorgridcolor: "#C8D4E3", | |
startlinecolor: "#2a3f5f", | |
}, | |
baxis: { | |
endlinecolor: "#2a3f5f", | |
gridcolor: "#C8D4E3", | |
linecolor: "#C8D4E3", | |
minorgridcolor: "#C8D4E3", | |
startlinecolor: "#2a3f5f", | |
}, | |
type: "carpet", | |
}, | |
], | |
choropleth: [ | |
{ | |
colorbar: { outlinewidth: 0, ticks: "" }, | |
type: "choropleth", | |
}, | |
], | |
contour: [ | |
{ | |
colorbar: { outlinewidth: 0, ticks: "" }, | |
colorscale: [ | |
[0.0, "#0d0887"], | |
[0.1111111111111111, "#46039f"], | |
[0.2222222222222222, "#7201a8"], | |
[0.3333333333333333, "#9c179e"], | |
[0.4444444444444444, "#bd3786"], | |
[0.5555555555555556, "#d8576b"], | |
[0.6666666666666666, "#ed7953"], | |
[0.7777777777777778, "#fb9f3a"], | |
[0.8888888888888888, "#fdca26"], | |
[1.0, "#f0f921"], | |
], | |
type: "contour", | |
}, | |
], | |
contourcarpet: [ | |
{ | |
colorbar: { outlinewidth: 0, ticks: "" }, | |
type: "contourcarpet", | |
}, | |
], | |
heatmap: [ | |
{ | |
colorbar: { outlinewidth: 0, ticks: "" }, | |
colorscale: [ | |
[0.0, "#0d0887"], | |
[0.1111111111111111, "#46039f"], | |
[0.2222222222222222, "#7201a8"], | |
[0.3333333333333333, "#9c179e"], | |
[0.4444444444444444, "#bd3786"], | |
[0.5555555555555556, "#d8576b"], | |
[0.6666666666666666, "#ed7953"], | |
[0.7777777777777778, "#fb9f3a"], | |
[0.8888888888888888, "#fdca26"], | |
[1.0, "#f0f921"], | |
], | |
type: "heatmap", | |
}, | |
], | |
heatmapgl: [ | |
{ | |
colorbar: { outlinewidth: 0, ticks: "" }, | |
colorscale: [ | |
[0.0, "#0d0887"], | |
[0.1111111111111111, "#46039f"], | |
[0.2222222222222222, "#7201a8"], | |
[0.3333333333333333, "#9c179e"], | |
[0.4444444444444444, "#bd3786"], | |
[0.5555555555555556, "#d8576b"], | |
[0.6666666666666666, "#ed7953"], | |
[0.7777777777777778, "#fb9f3a"], | |
[0.8888888888888888, "#fdca26"], | |
[1.0, "#f0f921"], | |
], | |
type: "heatmapgl", | |
}, | |
], | |
histogram: [ | |
{ | |
marker: { | |
pattern: { | |
fillmode: "overlay", | |
size: 10, | |
solidity: 0.2, | |
}, | |
}, | |
type: "histogram", | |
}, | |
], | |
histogram2d: [ | |
{ | |
colorbar: { outlinewidth: 0, ticks: "" }, | |
colorscale: [ | |
[0.0, "#0d0887"], | |
[0.1111111111111111, "#46039f"], | |
[0.2222222222222222, "#7201a8"], | |
[0.3333333333333333, "#9c179e"], | |
[0.4444444444444444, "#bd3786"], | |
[0.5555555555555556, "#d8576b"], | |
[0.6666666666666666, "#ed7953"], | |
[0.7777777777777778, "#fb9f3a"], | |
[0.8888888888888888, "#fdca26"], | |
[1.0, "#f0f921"], | |
], | |
type: "histogram2d", | |
}, | |
], | |
histogram2dcontour: [ | |
{ | |
colorbar: { outlinewidth: 0, ticks: "" }, | |
colorscale: [ | |
[0.0, "#0d0887"], | |
[0.1111111111111111, "#46039f"], | |
[0.2222222222222222, "#7201a8"], | |
[0.3333333333333333, "#9c179e"], | |
[0.4444444444444444, "#bd3786"], | |
[0.5555555555555556, "#d8576b"], | |
[0.6666666666666666, "#ed7953"], | |
[0.7777777777777778, "#fb9f3a"], | |
[0.8888888888888888, "#fdca26"], | |
[1.0, "#f0f921"], | |
], | |
type: "histogram2dcontour", | |
}, | |
], | |
mesh3d: [ | |
{ | |
colorbar: { outlinewidth: 0, ticks: "" }, | |
type: "mesh3d", | |
}, | |
], | |
parcoords: [ | |
{ | |
line: { colorbar: { outlinewidth: 0, ticks: "" } }, | |
type: "parcoords", | |
}, | |
], | |
pie: [{ automargin: true, type: "pie" }], | |
scatter: [ | |
{ | |
marker: { colorbar: { outlinewidth: 0, ticks: "" } }, | |
type: "scatter", | |
}, | |
], | |
scatter3d: [ | |
{ | |
line: { colorbar: { outlinewidth: 0, ticks: "" } }, | |
marker: { colorbar: { outlinewidth: 0, ticks: "" } }, | |
type: "scatter3d", | |
}, | |
], | |
scattercarpet: [ | |
{ | |
marker: { colorbar: { outlinewidth: 0, ticks: "" } }, | |
type: "scattercarpet", | |
}, | |
], | |
scattergeo: [ | |
{ | |
marker: { colorbar: { outlinewidth: 0, ticks: "" } }, | |
type: "scattergeo", | |
}, | |
], | |
scattergl: [ | |
{ | |
marker: { colorbar: { outlinewidth: 0, ticks: "" } }, | |
type: "scattergl", | |
}, | |
], | |
scattermapbox: [ | |
{ | |
marker: { colorbar: { outlinewidth: 0, ticks: "" } }, | |
type: "scattermapbox", | |
}, | |
], | |
scatterpolar: [ | |
{ | |
marker: { colorbar: { outlinewidth: 0, ticks: "" } }, | |
type: "scatterpolar", | |
}, | |
], | |
scatterpolargl: [ | |
{ | |
marker: { colorbar: { outlinewidth: 0, ticks: "" } }, | |
type: "scatterpolargl", | |
}, | |
], | |
scatterternary: [ | |
{ | |
marker: { colorbar: { outlinewidth: 0, ticks: "" } }, | |
type: "scatterternary", | |
}, | |
], | |
surface: [ | |
{ | |
colorbar: { outlinewidth: 0, ticks: "" }, | |
colorscale: [ | |
[0.0, "#0d0887"], | |
[0.1111111111111111, "#46039f"], | |
[0.2222222222222222, "#7201a8"], | |
[0.3333333333333333, "#9c179e"], | |
[0.4444444444444444, "#bd3786"], | |
[0.5555555555555556, "#d8576b"], | |
[0.6666666666666666, "#ed7953"], | |
[0.7777777777777778, "#fb9f3a"], | |
[0.8888888888888888, "#fdca26"], | |
[1.0, "#f0f921"], | |
], | |
type: "surface", | |
}, | |
], | |
table: [ | |
{ | |
cells: { | |
fill: { color: "#EBF0F8" }, | |
line: { color: "white" }, | |
}, | |
header: { | |
fill: { color: "#C8D4E3" }, | |
line: { color: "white" }, | |
}, | |
type: "table", | |
}, | |
], | |
}, | |
layout: { | |
annotationdefaults: { | |
arrowcolor: "#2a3f5f", | |
arrowhead: 0, | |
arrowwidth: 1, | |
}, | |
autotypenumbers: "strict", | |
coloraxis: { colorbar: { outlinewidth: 0, ticks: "" } }, | |
colorscale: { | |
diverging: [ | |
[0, "#8e0152"], | |
[0.1, "#c51b7d"], | |
[0.2, "#de77ae"], | |
[0.3, "#f1b6da"], | |
[0.4, "#fde0ef"], | |
[0.5, "#f7f7f7"], | |
[0.6, "#e6f5d0"], | |
[0.7, "#b8e186"], | |
[0.8, "#7fbc41"], | |
[0.9, "#4d9221"], | |
[1, "#276419"], | |
], | |
sequential: [ | |
[0.0, "#0d0887"], | |
[0.1111111111111111, "#46039f"], | |
[0.2222222222222222, "#7201a8"], | |
[0.3333333333333333, "#9c179e"], | |
[0.4444444444444444, "#bd3786"], | |
[0.5555555555555556, "#d8576b"], | |
[0.6666666666666666, "#ed7953"], | |
[0.7777777777777778, "#fb9f3a"], | |
[0.8888888888888888, "#fdca26"], | |
[1.0, "#f0f921"], | |
], | |
sequentialminus: [ | |
[0.0, "#0d0887"], | |
[0.1111111111111111, "#46039f"], | |
[0.2222222222222222, "#7201a8"], | |
[0.3333333333333333, "#9c179e"], | |
[0.4444444444444444, "#bd3786"], | |
[0.5555555555555556, "#d8576b"], | |
[0.6666666666666666, "#ed7953"], | |
[0.7777777777777778, "#fb9f3a"], | |
[0.8888888888888888, "#fdca26"], | |
[1.0, "#f0f921"], | |
], | |
}, | |
colorway: [ | |
"#000", | |
"#000", | |
"#000", | |
"#000", | |
"#000", | |
"#000", | |
"#000", | |
"#000", | |
"#000", | |
"#FECB52", | |
], | |
font: { color: "#2a3f5f" }, | |
geo: { | |
bgcolor: "red", | |
lakecolor: "white", | |
landcolor: "white", | |
showlakes: true, | |
showland: true, | |
subunitcolor: "#C8D4E3", | |
}, | |
hoverlabel: { align: "left" }, | |
hovermode: "closest", | |
mapbox: { style: "light" }, | |
paper_bgcolor: "white", | |
plot_bgcolor: "white", | |
polar: { | |
angularaxis: { | |
gridcolor: "#EBF0F8", | |
linecolor: "#EBF0F8", | |
ticks: "", | |
}, | |
bgcolor: "white", | |
radialaxis: { | |
gridcolor: "#EBF0F8", | |
linecolor: "#EBF0F8", | |
ticks: "", | |
}, | |
}, | |
scene: { | |
xaxis: { | |
backgroundcolor: "white", | |
gridcolor: "#DFE8F3", | |
gridwidth: 2, | |
linecolor: "#EBF0F8", | |
showbackground: true, | |
ticks: "", | |
zerolinecolor: "#EBF0F8", | |
}, | |
yaxis: { | |
backgroundcolor: "white", | |
gridcolor: "#DFE8F3", | |
gridwidth: 2, | |
linecolor: "#EBF0F8", | |
showbackground: true, | |
ticks: "", | |
zerolinecolor: "#EBF0F8", | |
}, | |
zaxis: { | |
backgroundcolor: "white", | |
gridcolor: "#DFE8F3", | |
gridwidth: 2, | |
linecolor: "#EBF0F8", | |
showbackground: true, | |
ticks: "", | |
zerolinecolor: "#EBF0F8", | |
}, | |
}, | |
shapedefaults: { line: { color: "#2a3f5f" } }, | |
ternary: { | |
aaxis: { | |
gridcolor: "#DFE8F3", | |
linecolor: "#A2B1C6", | |
ticks: "", | |
}, | |
baxis: { | |
gridcolor: "#DFE8F3", | |
linecolor: "#A2B1C6", | |
ticks: "", | |
}, | |
bgcolor: "white", | |
caxis: { | |
gridcolor: "#DFE8F3", | |
linecolor: "#A2B1C6", | |
ticks: "", | |
}, | |
}, | |
title: { x: 0.05 }, | |
xaxis: { | |
automargin: true, | |
gridcolor: "#EBF0F8", | |
linecolor: "#EBF0F8", | |
ticks: "", | |
title: { standoff: 15 }, | |
zerolinecolor: "#EBF0F8", | |
zerolinewidth: 2, | |
visible: false, | |
show: false, | |
hidden: true, | |
}, | |
yaxis: { | |
automargin: true, | |
gridcolor: "#EBF0F8", | |
linecolor: "#EBF0F8", | |
ticks: "", | |
title: { standoff: 15 }, | |
zerolinecolor: "#EBF0F8", | |
zerolinewidth: 2, | |
visible: false, | |
show: false, | |
hidden: true, | |
}, | |
}, | |
}, | |
// itt van a width | |
width: window.innerWidth - 170, | |
height: window.innerHeight - 50, | |
xaxis: { | |
automargin: false, | |
showgrid: false, | |
showline: true, | |
showspikes: false, | |
showticklabels: true, | |
zeroline: false, | |
}, | |
yaxis: { | |
automargin: false, | |
showgrid: false, | |
showline: true, | |
showspikes: false, | |
showticklabels: true, | |
zeroline: false, | |
}, | |
}, | |
{ responsive: true } | |
); | |
// rotate by using time, around the center of the plot | |
// x: 0.4, y: -1.88, z: 0.3 | |
var cnt = 1; | |
var interval = setInterval(function () { | |
Plotly.relayout( | |
"myPlot", | |
{ | |
"scene.camera.eye.x": 0.4 * cnt, | |
// "scene.camera.eye.y": -1.88 * Math.sin(cnt), | |
// "scene.camera.eye.z": 0.3 * cnt, | |
}, | |
[0] | |
); | |
if (cnt > 2) clearInterval(interval); | |
cnt += 0.001; | |
}, 1); | |
document.addEventListener("click", function () { | |
clearInterval(interval); | |
}); | |
document.addEventListener("mousedown", function () { | |
clearInterval(interval); | |
}); | |
</script> | |
</div> | |
</body> | |
</html> | |