-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c16d6b4
commit e6d804b
Showing
8 changed files
with
361 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
<div id="budget-roi-plot"></div> | ||
<script> | ||
// Sample data | ||
const budgets = Array.from({length: 100}, () => Math.random() * 200000000); | ||
const rois = budgets.map(b => (Math.random() - 0.5) * 300); | ||
const movieNames = budgets.map((_, i) => `Movie ${i+1}`); | ||
|
||
const trace = { | ||
x: budgets, | ||
y: rois, | ||
mode: 'markers', | ||
type: 'scatter', | ||
text: movieNames, | ||
marker: { | ||
size: 10, | ||
color: rois.map(roi => roi < 0 ? '#ff6b6b' : '#4ecdc4'), | ||
opacity: 0.7 | ||
}, | ||
hovertemplate: | ||
'<b>%{text}</b><br>' + | ||
'Budget: $%{x:,.0f}<br>' + | ||
'ROI: %{y:.1f}%<br>' + | ||
'<extra></extra>' | ||
}; | ||
|
||
const layout = { | ||
title: { | ||
text: 'Movie Budgets vs Return on Investment', | ||
font: { size: 24 } | ||
}, | ||
xaxis: { | ||
title: 'Budget (USD)', | ||
tickformat: '$,.0f' | ||
}, | ||
yaxis: { | ||
title: 'Return on Investment (%)', | ||
zeroline: true, | ||
zerolinecolor: '#969696', | ||
gridcolor: '#e1e1e1' | ||
}, | ||
paper_bgcolor: 'rgba(0,0,0,0)', | ||
plot_bgcolor: 'rgba(0,0,0,0)', | ||
hovermode: 'closest', | ||
showlegend: false, | ||
shapes: [{ | ||
type: 'line', | ||
x0: 0, | ||
x1: 200000000, | ||
y0: 0, | ||
y1: 0, | ||
line: { | ||
color: '#969696', | ||
width: 1, | ||
dash: 'dot' | ||
} | ||
}] | ||
}; | ||
|
||
const config = { | ||
responsive: true, | ||
displayModeBar: false | ||
}; | ||
|
||
Plotly.newPlot('budget-roi-plot', [trace], layout, config); | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
<div id="budget-roi-plot"></div> | ||
<script> | ||
// Sample data | ||
const budgets = Array.from({length: 100}, () => Math.random() * 200000000); | ||
const rois = budgets.map(b => (Math.random() - 0.5) * 300); | ||
const movieNames = budgets.map((_, i) => `Movie ${i+1}`); | ||
|
||
const trace = { | ||
x: budgets, | ||
y: rois, | ||
mode: 'markers', | ||
type: 'scatter', | ||
text: movieNames, | ||
marker: { | ||
size: 10, | ||
color: rois.map(roi => roi < 0 ? '#ff6b6b' : '#4ecdc4'), | ||
opacity: 0.7 | ||
}, | ||
hovertemplate: | ||
'<b>%{text}</b><br>' + | ||
'Budget: $%{x:,.0f}<br>' + | ||
'ROI: %{y:.1f}%<br>' + | ||
'<extra></extra>' | ||
}; | ||
|
||
const layout = { | ||
title: { | ||
text: 'Movie Budgets vs Return on Investment', | ||
font: { size: 24 } | ||
}, | ||
xaxis: { | ||
title: 'Budget (USD)', | ||
tickformat: '$,.0f' | ||
}, | ||
yaxis: { | ||
title: 'Return on Investment (%)', | ||
zeroline: true, | ||
zerolinecolor: '#969696', | ||
gridcolor: '#e1e1e1' | ||
}, | ||
paper_bgcolor: 'rgba(0,0,0,0)', | ||
plot_bgcolor: 'rgba(0,0,0,0)', | ||
hovermode: 'closest', | ||
showlegend: false, | ||
shapes: [{ | ||
type: 'line', | ||
x0: 0, | ||
x1: 200000000, | ||
y0: 0, | ||
y1: 0, | ||
line: { | ||
color: '#969696', | ||
width: 1, | ||
dash: 'dot' | ||
} | ||
}] | ||
}; | ||
|
||
const config = { | ||
responsive: true, | ||
displayModeBar: false | ||
}; | ||
|
||
Plotly.newPlot('budget-roi-plot', [trace], layout, config); | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
<div id="budget-roi-plot"></div> | ||
<script> | ||
// Sample data | ||
const budgets = Array.from({length: 100}, () => Math.random() * 200000000); | ||
const rois = budgets.map(b => (Math.random() - 0.5) * 300); | ||
const movieNames = budgets.map((_, i) => `Movie ${i+1}`); | ||
|
||
const trace = { | ||
x: budgets, | ||
y: rois, | ||
mode: 'markers', | ||
type: 'scatter', | ||
text: movieNames, | ||
marker: { | ||
size: 10, | ||
color: rois.map(roi => roi < 0 ? '#ff6b6b' : '#4ecdc4'), | ||
opacity: 0.7 | ||
}, | ||
hovertemplate: | ||
'<b>%{text}</b><br>' + | ||
'Budget: $%{x:,.0f}<br>' + | ||
'ROI: %{y:.1f}%<br>' + | ||
'<extra></extra>' | ||
}; | ||
|
||
const layout = { | ||
title: { | ||
text: 'Movie Budgets vs Return on Investment', | ||
font: { size: 24 } | ||
}, | ||
xaxis: { | ||
title: 'Budget (USD)', | ||
tickformat: '$,.0f' | ||
}, | ||
yaxis: { | ||
title: 'Return on Investment (%)', | ||
zeroline: true, | ||
zerolinecolor: '#969696', | ||
gridcolor: '#e1e1e1' | ||
}, | ||
paper_bgcolor: 'rgba(0,0,0,0)', | ||
plot_bgcolor: 'rgba(0,0,0,0)', | ||
hovermode: 'closest', | ||
showlegend: false, | ||
shapes: [{ | ||
type: 'line', | ||
x0: 0, | ||
x1: 200000000, | ||
y0: 0, | ||
y1: 0, | ||
line: { | ||
color: '#969696', | ||
width: 1, | ||
dash: 'dot' | ||
} | ||
}] | ||
}; | ||
|
||
const config = { | ||
responsive: true, | ||
displayModeBar: false | ||
}; | ||
|
||
Plotly.newPlot('budget-roi-plot', [trace], layout, config); | ||
</script> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.