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: Tue, 14 Oct 2025 09:05:23 GMT
etag: W/"68e952e4-77b9"
expires: Tue, 14 Oct 2025 06:11:16 GMT
last-modified: Fri, 10 Oct 2025 18:39:32 GMT
server: Vercel
strict-transport-security: max-age=63072000
vary: Accept-Encoding
via: 1.1 varnish
x-cache: HIT
x-cache-hits: 0
x-fastly-request-id: 90be2d1f0055ab16c402d7990779a23c06ef5f07
x-github-request-id: 7B54:DAA1D:40EE7:52820:68EDE729
x-origin-cache: HIT
x-proxy-cache: MISS
x-robots-tag: index
x-served-by: cache-bom-vanm7210033-BOM
x-timer: S1760432724.669842,VS0,VE285
x-vercel-cache: MISS
x-vercel-id: bom1::7nd2l-1760432723658-9b2a577d2001
content-length: 8041
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. Try Plotly Studio 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 );
