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

latitude vs longitude 1:1 #199

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion front-end/src/components/views/Chart/Chart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,13 @@ const Chart = ({ chartInformation, video, videoTimestamp }: ChartProps) => {
const { width, height, ref } = useResizeDetector({
onResize: () => {
if (chartRef.current) {
chartRef.current.setSize(width, height);
if(width!=undefined && height!=undefined) {
const size = Math.min(width ,height);
chartRef.current.setSize(size,size);
}else {
chartRef.current.setSize(width,height);
}
Comment on lines +81 to +86
Copy link
Collaborator

Choose a reason for hiding this comment

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

Faiirrlly certain this would only make the graph itself a square, but not concern itself with the scale of the axes. Taking a look into it now

Copy link
Collaborator

Choose a reason for hiding this comment

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

This also still applies to all graphs

Copy link
Collaborator

Choose a reason for hiding this comment

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

image

This is just an example, but if you see here the axes not being to scale, then it doesn't exactly solve the issue here. Just making the graph itself a square doesn't resolve the sizes being off regardless. On the y, we have 0-300k and on the x 0-50k, which is a big difference in scale


}
},
refreshMode: 'debounce',
Expand Down
Loading