-
Notifications
You must be signed in to change notification settings - Fork 111
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add "others" as a variant #342
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,7 +30,8 @@ | |
"22C (Omicron)", | ||
"22D (Omicron)", | ||
"S:677H.Robin1", | ||
"S:677P.Pelican" | ||
"S:677P.Pelican", | ||
"others" | ||
], | ||
Comment on lines
+33
to
35
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. "others" needs to be added into the list of |
||
"distributions": [ | ||
{ | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,7 @@ import ReactResizeDetector from 'react-resize-detector' | |
|
||
import type { PerCountryCasesDistributionDatum } from 'src/io/getPerCountryCasesData' | ||
import { ticks, timeDomain } from 'src/io/getParams' | ||
import { CLUSTER_NAME_OTHERS, getClusterColor } from 'src/io/getClusters' | ||
import { getClusterColor } from 'src/io/getClusters' | ||
import { formatDateHumanely } from 'src/helpers/format' | ||
import { adjustTicks } from 'src/helpers/adjustTicks' | ||
import { PlotPlaceholder } from 'src/components/Common/PlotPlaceholder' | ||
|
@@ -90,16 +90,6 @@ export function CasesPlotComponent({ cluster_names, distribution }: CasesPlotPro | |
/> | ||
))} | ||
|
||
<Area | ||
type="monotone" | ||
dataKey={CLUSTER_NAME_OTHERS} | ||
stackId="1" | ||
stroke="none" | ||
fill={theme.clusters.color.others} | ||
fillOpacity={1} | ||
isAnimationActive={false} | ||
/> | ||
|
||
<CartesianGrid stroke={theme.plot.cartesianGrid.stroke} /> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Here I remove the additional ad-hoc area segment from the cases plot. The same should be done for the other plot(s), when they get their own "others" data. |
||
|
||
<Tooltip | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the definition of the "others" variant in
clusters.py
. This object will be emitted intoclusters.json
along with other variants.It should be the last object in the list to keep the display order of area segments on the plot the same. However you can play with the order to your liking.