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

feat: Design and implement several variable charts #716

Merged
merged 10 commits into from
Oct 22, 2023

Conversation

wj23027
Copy link
Collaborator

@wj23027 wj23027 commented Aug 13, 2023

Brief Information

This pull request is in the type of (more info about types):

  • build
  • ci
  • docs
  • feat
  • fix
  • perf
  • refactor
  • test

Related issues (all available keywords):

Details

I have implemented a basic grid layout for the charts, allowing different-sized charts to be added to the layout.

image

In the next steps, I will need to add logic to allow users to add charts of specific sizes and types to specific positions, and optimize the styling of the layout.

Next Steps:

  • Adjust the visual presentation of the charts.
  • Implement Additional Chart Styles
  • optimize the styling of the layout
  • add logic to allow users to add charts of specific sizes and types to specific positions
  • i18n
  • Integrate the feature into 'Repo Collections' feature

Checklist

Others

@andyhuang18
Copy link
Collaborator

Great! Wish you have a good time in your trip. 😄

@wxharry wxharry changed the base branch from master to feat/repo-collection August 20, 2023 18:04
@wxharry
Copy link
Collaborator

wxharry commented Aug 24, 2023

Hi, @wj23027 . I have changed this base branch to feat/repo-collection since you and Andy is working on one feature. I have implmented a modal view for testing new charts. It helps to focus on developing the component itself. Since this branch highly depends on the work from Andy, my suggestion is that you can work on new charts first, wait til Andy implements the modal.

Copy link
Member

@tyn1998 tyn1998 left a comment

Choose a reason for hiding this comment

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

Hi @wj23027, I found that the GridLayout is not imported by any file so I guess the screenshot you provided in the PR description is just for preview. Since @wxharry provided a way to test your charts, you can import GridLayout there.

Besides, please comment the code in English and hurry up :D

@wj23027
Copy link
Collaborator Author

wj23027 commented Sep 8, 2023

Hi, @wj23027 . I have changed this base branch to feat/repo-collection since you and Andy is working on one feature. I have implmented a modal view for testing new charts. It helps to focus on developing the component itself. Since this branch highly depends on the work from Andy, my suggestion is that you can work on new charts first, wait til Andy implements the modal.

@wxharry , thank you for your suggestions and the method you provided for testing the new charts! I have now developed some of the charts(as shown below). Next, I will continue to work on the boxplot and Sankey chart with Andy~

image

@wj23027
Copy link
Collaborator Author

wj23027 commented Sep 24, 2023

This update introduces two new charts: boxplot chart and a Sankey chart . The box plot is used to illustrate the approximate distribution of issue response times, while the Sankey chart showcases user activity across different repositories.

boxplot chart :

image

Sankey chart:

image

@wj23027
Copy link
Collaborator Author

wj23027 commented Sep 24, 2023

In addition, a simple grid layout component has been implemented to display the charts separately in both the modal and option pages.

image

Furthermore, clicking on menu items can highlight data for corresponding repositories in certain charts.

1695573083866

Next Tasks :

  • Implement highlighting for other charts.
  • Fine-tune chart styles.
  • Merge Andy's code contributions.

@tyn1998
Copy link
Member

tyn1998 commented Sep 27, 2023

@wj23027 The Sankey chart is really good.

There are only two repos in the demo collection, could you add more repos into it? Please bare in mind that these charts should be scalable for any given collection of different size.

@tyn1998
Copy link
Member

tyn1998 commented Oct 8, 2023

@wj23027 The Sankey chart is really good.

There are only two repos in the demo collection, could you add more repos into it? Please bare in mind that these charts should be scalable for any given collection of different size.

Hello @wj23027, could you add more repos into your mock data? Since in my view, these two charts are not a good choice for those collections with 3+ repos.

image

Copy link
Member

@tyn1998 tyn1998 left a comment

Choose a reason for hiding this comment

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

Hi @wj23027, thanks for your time and effort contributed to this OSPP project. Here are some suggestions for you and I will give more of them in the following days.

src/pages/Options/variable-charts/GridLayout.tsx Outdated Show resolved Hide resolved
src/helpers/get-newest-month.ts Outdated Show resolved Hide resolved
@wj23027
Copy link
Collaborator Author

wj23027 commented Oct 15, 2023

In this update, I added numerical display panels.I tried increasing the number of repositories in the collection and noticed that after the increase, the code additions and deletions chart as well as the multi-dimensional bar chart didn't look very aesthetically pleasing. So, I made the following adjustments:

  1. Changed the code additions and deletions chart to an area chart,
  2. Limited the display range of the multi-dimensional bar chart to the last 6 months,
  3. Added stacked bar chart.

@wj23027
Copy link
Collaborator Author

wj23027 commented Oct 15, 2023

Here is a screenshot of the updated charts:

image

image

@wj23027
Copy link
Collaborator Author

wj23027 commented Oct 15, 2023

Additionally, I've noticed that when the collection contains too many developers, there are some issues with the Sankey chart's display. Therefore, I've increased the size of the Sankey chart, but it still works best for collections containing no more than 150 developers (ideally, fewer than 100).

@wj23027
Copy link
Collaborator Author

wj23027 commented Oct 15, 2023

I have an issue to address: in the stacked bar chart, the data from different series isn't stacking as intended, but I haven't found the reason yet.

image

@andyhuang18
Copy link
Collaborator

Here is a screenshot of the updated charts:

image

image

Looks good!

@wxharry
Copy link
Collaborator

wxharry commented Oct 19, 2023

Additionally, I've noticed that when the collection contains too many developers, there are some issues with the Sankey chart's display. Therefore, I've increased the size of the Sankey chart, but it still works best for collections containing no more than 150 developers (ideally, fewer than 100).

Great! I am glad you tested it. Then we should add a warning or notice like when users are trying to add a sankey chart. I prefer adding it anyway since this is a very cool chart. What do you think @tyn1998 ?

I have an issue to address: in the stacked bar chart, the data from different series isn't stacking as intended, but I haven't found the reason yet.

It is because the two data arraies have different lengths.
image

I simply sliced the data arraies to the latest 37 elements and it works.
image

I think we need additional functions to fill up what's missing to 0.

@wxharry
Copy link
Collaborator

wxharry commented Oct 19, 2023

Also, please pay attention to the style below. The charts are not supposed to be outside of their containers. I hope it's a small fix, but if it's not, a temporary workaround is acceptable.
image

@zhicheng-ning
Copy link
Contributor

Some suggestions:

  • The dimensions of the chart need to be adapted. For example:change it from150000 to 150k
  • The maximum value of the chart is adapted,it will be more beautiful. For example:change maximun value from 120 to 20(The maximum value among all existing values).

Also, please pay attention to the style below. The charts are not supposed to be outside of their containers. I hope it's a small fix, but if it's not, a temporary workaround is acceptable. image

@wj23027
Copy link
Collaborator Author

wj23027 commented Oct 22, 2023

Hi, I merged the collection contents(including the repolist and dashboard) into the Collection Modal~

image

@wj23027 wj23027 marked this pull request as ready for review October 22, 2023 14:10
Copy link
Member

@tyn1998 tyn1998 left a comment

Choose a reason for hiding this comment

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

Great job @wj23027 !

Your work LGTM, thank you for your contributions!

@tyn1998 tyn1998 merged commit 43f1ee1 into hypertrons:feat/repo-collection Oct 22, 2023
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants