CARVIEW |
Select Language
HTTP/2 200
accept-ranges: bytes
access-control-allow-origin: *
age: 0
cache-control: max-age=600
content-encoding: gzip
content-type: text/html; charset=utf-8
date: Wed, 30 Jul 2025 02:10:57 GMT
etag: W/"687e6266-7303"
expires: Wed, 30 Jul 2025 02:20:57 GMT
last-modified: Mon, 21 Jul 2025 15:53:10 GMT
server: Vercel
strict-transport-security: max-age=63072000
vary: Accept-Encoding
via: 1.1 varnish
x-cache: MISS
x-cache-hits: 0
x-fastly-request-id: bd1e27295c5228cf8b467d46b3c4c73d11d76570
x-github-request-id: E127:944FA:1021BC:132C27:68897F2C
x-origin-cache: HIT
x-proxy-cache: MISS
x-robots-tag: index
x-served-by: cache-bom-vanm7210035-BOM
x-timer: S1753841457.233670,VS0,VE232
x-vercel-cache: MISS
x-vercel-id: bom1::gbsvf-1753841457219-56743a05c585
content-length: 7929
Responsive / fluid layouts in JavaScript
Responsive / Fluid Layouts in JavaScript
How to create figures with responsive/fluid layouts in JavaScript.
Plotly Studio: Transform any dataset into an interactive data application in minutes with AI. Sign up for early access now.
If you set the responsive
attribute equal to true
(using the config
object), then your figures will be automatically resized when the browser window size changes. This is an especially useful feature for charts which are going to viewed on mobile devices!
var trace1 = {
type: 'bar',
x: [1, 2, 3, 4],
y: [5, 10, 2, 8],
marker: {
color: '#C8A2C8',
line: {
width: 2.5
}
}
};
var data = [ trace1 ];
var layout = {
title: {
text: 'Responsive to window\'s size!'
},
font: {size: 18}
};
var config = {responsive: true}
Plotly.newPlot('myDiv', data, layout, config );
