Skip to content
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

Tooltip and chart styling fixes #535

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Conversation

ellisl10
Copy link

@ellisl10 ellisl10 commented Dec 7, 2024

Tooltip and chart styling fixes

Description

Moved color constants and tooltip dimensions/styling to separate files and made dimensions that same.

Screenshots

Before
Screenshot 2024-12-09 at 8 04 34 PM

After
Screenshot 2024-12-09 at 8 03 14 PM

Steps to verify/test this change:

  • Verify changes work as expected on staging instance

Final Checks:

  • Verify successful deployment

(optional)

  • Write tests
  • Write documentation

Issues

Closes #

@ellisl10 ellisl10 marked this pull request as ready for review December 10, 2024 04:05
@Awesome-E Awesome-E linked an issue Dec 11, 2024 that may be closed by this pull request
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is an example file for the format of environment variables, not env variables themselves. It should not be deleted

@@ -165,24 +177,11 @@ export default class Pie extends React.Component<PieProps> {
enableArcLinkLabels={false}
innerRadius={0.8}
padAngle={2}
colors={['#60A3D1', '#81C284', '#F5D77F', '#ECAD6D', '#E8966D', '#4AB486', '#E36436']}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like the last two removed colors here are actually different from the other list. I think we should use the green and red for pass + no pass instead of making them gray

@@ -102,7 +104,7 @@ export default class Pie extends React.Component<PieProps> {
id: 'A',
label: 'A',
value: gradeACount,
color: '#60A3D1',
color: '#54B058',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

consider using something like colors[0] for this so we can make these use the same source for colors

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generally, files without components should start with lowercase and would end in .ts instead of .tsx, i.e. chartColors.ts

Since Colors is not a component, I suggest renaming this file to colors.ts with an export const colors = [...]

@@ -0,0 +1,17 @@
import { type Theme } from '@nivo/core';

export const TooltipStyle: Theme = {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same comment as Colors

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Chart / Pie Grade Distributions Styling Fixes
2 participants