plotly.js
Version:
The open source javascript graphing library that powers plotly
27 lines • 785 B
HTML
<html>
<head>
<title>Test Sketchmode Layout Property</title>
<!-- <script src="dist/plotly.js"></script> -->
<!-- <script src="https://cdn.plot.ly/plotly-1.58.4.min.js"></script> -->
<script src="https://cdn.plot.ly/plotly-3.1.0.min.js"></script>
</head>
<body>
<div id="plot" style="width:600px;height:400px;"></div>
<script>
var xvals = [1, 2, 3, 4];
var yvals = [10, 2, 11, 13];
var data = [{
x: xvals,
y: yvals,
type: 'bar',
text: yvals.map((v) => `Value: ${v}`),
textposition: 'outside',
}];
var layout = {
title: {text: 'Clipped bar text'},
};
Plotly.newPlot('plot', data, layout);
</script>
</body>
</html>