Created
April 6, 2025 13:46
-
-
Save pranitkhadilkar7/9248ae0141c53e74538d592b2358f23a to your computer and use it in GitHub Desktop.
Responsive Design
This file contains hidden or 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
const options1 = { | |
responsive: { | |
rules: [{ | |
condition: { | |
maxWidth: 500 | |
}, | |
chartOptions: { | |
legend: { | |
layout: 'horizontal', | |
align: 'center', | |
verticalAlign: 'bottom' | |
}, | |
yAxis: { | |
labels: { | |
align: 'left', | |
x: 0, | |
y: -5 | |
} | |
} | |
} | |
}] | |
} | |
}; | |
const option2 = { | |
chart: { | |
marginLeft: 70, | |
marginRight: 40, | |
height: '60%' // Relative to container | |
}, | |
responsive: { | |
rules: [{ | |
condition: { | |
minWidth: 768 // tablet and desktop | |
}, | |
chartOptions: { | |
chart: { | |
height: '400px' // Fixed height for larger screens | |
} | |
} | |
}] | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment