Testing multiple choice line charts

This commit is contained in:
ahalekelly 2022-08-29 19:50:32 -07:00
parent 1d948821ca
commit b1d924614f

View File

@ -87,7 +87,7 @@ export const AnswersGraph = memo(function AnswersGraph(props: {
> >
<ResponsiveLine <ResponsiveLine
data={data} data={data}
yScale={{ min: 0, max: 100, type: 'linear', stacked: true }} yScale={{ min: 0, max: 100, type: 'linear' }}
yFormat={formatPercent} yFormat={formatPercent}
gridYValues={yTickValues} gridYValues={yTickValues}
axisLeft={{ axisLeft={{
@ -107,20 +107,11 @@ export const AnswersGraph = memo(function AnswersGraph(props: {
format: (time) => format: (time) =>
formatTime(+time, multiYear, lessThanAWeek, includeMinute), formatTime(+time, multiYear, lessThanAWeek, includeMinute),
}} }}
colors={[ colors={{ scheme: 'category10' }}
'#fca5a5', // red-300
'#a5b4fc', // indigo-300
'#86efac', // green-300
'#fef08a', // yellow-200
'#fdba74', // orange-300
'#c084fc', // purple-400
]}
pointSize={0} pointSize={0}
curve="stepAfter" curve="stepAfter"
enableSlices="x" enableSlices="x"
enableGridX={!!width && width >= 800} enableGridX={!!width && width >= 800}
enableArea
areaOpacity={1}
margin={{ top: 20, right: 20, bottom: 25, left: 40 }} margin={{ top: 20, right: 20, bottom: 25, left: 40 }}
legends={[ legends={[
{ {