Enable customized colors for line graph #92
Labels
No Label
Bug
Component
Config
Good First Issue
Low-Priority
Page
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: www/cs-2022-class-profile#92
Loading…
Reference in New Issue
No description provided.
Delete Branch "line-graph-multiple-color"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@ -124,2 +126,4 @@
const xLength = data.xValues.length;
if (data.lines.length != colorRange.length) {
throw new Error("Invalid data with wrong length.");
Nice catch here!
Hey @b72zhou ! Most of it LGTM! I think there are some linting errors to fix. Also, I'm running into this error
Watchpack Error (watcher): Error: ENOSPC: System limit for number of file watchers reached, watch '/users/e26chiu/cs-2022-class-profile/node_modules/reduce-css-calc/node_modules'
when I runnpm run dev
locally.Does it happen to you too?
@ -258,4 +264,2 @@
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
y={(d) => yScale(getY(d))!}
stroke={
isEven ? Color.primaryAccent : Color.secondaryAccent
Since
isEven
is not used anymore, we can also remove the definition of that constant.@ -60,6 +60,7 @@ interface LineGraphProps {
left: number;
right: number;
};
colorRange: string[];
Perhaps add a comment here to mention that the length of
colorRange
should match the length ofdata
and explains its purpose, i.e. List of hexademical colours for each line, length of the list should match the length of data.Nope, it doesn't to me locally. It's weird, does it affect the rendering of pages?
@snedadah Could you please try to run dev locally and see if this happens to you?
I found that it might be a prettier problem and I fix it now. Could you please try again and see if it's still there? @e26chiu
@snedadah may need you to take a look...
LGTM! I don't have that issue when running anymore. @e26chiu could you confirm that you don't have that webpack issue?