@postlight/react-google-sheet-to-chart
Version:
Transform Google sheets to pretty charts!
47 lines (45 loc) • 746 B
JavaScript
// predefined chart options for horizontal bar charts
const options = {
indexAxis: 'y',
responsive: true,
maintainAspectRatio: false,
layout: {
padding: {
left: 10,
right: 10,
top: 10,
bottom: 10,
},
},
scales: {
x: {
display: true,
grid: { display: false },
labels: [],
id: 'x-axis-1',
ticks: {
beginAtZero: true,
},
},
y: {
display: true,
position: 'left',
id: 'y-axis-1',
ticks: {
beginAtZero: true,
},
},
},
plugins: {
title: {
display: false,
text: '',
fontSize: 20,
padding: 20,
},
legend: {
position: 'bottom',
},
},
};
export default options;