chart = {
const container = html`<div></div>`
yield container
const colors = mapd3.colors.mapdColors
const chart = mapd3
.Chart(container)
.setConfig({
width: width,
height: 400,
margin: {
top: 32,
right: 70,
bottom: 64,
left: 80
},
keyType: "string",
chartType: "stackedBar",
useScrolling: true,
isAnimated: false,
animationDuration: 1500,
defaultColor: "skyblue",
xDomain: "auto",
yDomain: "auto",
y2Domain: "auto",
sortBy: "totalDescending",
tickPadding: 5,
tickSizes: 8,
yTicks: "auto",
y2Ticks: "auto",
xTickSkip: "auto",
xAxisFormat: "auto",
yAxisFormat: "auto",
y2AxisFormat: ".2f",
tooltipFormat: [".4f", ".6f"],
grid: "horizontal",
axisTransitionDuration: 0,
labelsAreRotated: false,
dotRadius: 4,
mouseChaseDuration: 0,
tooltipIsEnabled: true,
dateFormat: "%b %d, %Y",
tooltipTitleDateFormat: "%b %d, %Y",
inputDateFormat: "%m-%d-%Y",
numberFormat: ".2f",
legendXPosition: "auto",
legendYPosition: "auto",
legendTitle: "Dataset",
legendIsEnabled: true,
binningResolution: "1mo",
binningIsAuto: true,
binningToggles: ["10y", "1y", "1q", "1mo"],
binningIsEnabled: false,
xLock: false,
yLock: false,
y2Lock: false,
xDomainEditorIsEnabled: false,
yDomainEditorIsEnabled: false,
y2DomainEditorIsEnabled: false,
brushRangeIsEnabled: false,
brushIsEnabled: false,
xLabel: "X Axis Label",
yLabel: "Y Axis Label",
barSpacingPercent: 10,
selectedKeys: []
})
.setData(series)
return chart
}