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

created line chart with blue circle following cursor + save-on-click #11

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

Conversation

LB0ge
Copy link
Contributor

@LB0ge LB0ge commented Apr 21, 2023

No description provided.

Copy link
Collaborator

@pawellysy pawellysy left a comment

Choose a reason for hiding this comment

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

Nice job! Just one comment though!

Comment on lines 29 to 33
if (cursorCircle) {
cursorCircle.attr({ x, y });
} else {
cursorCircle = chart.renderCircle(x, y);
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Here you are checking if the cursorCircle exists. Why don't you create it straight away (e.g. in the line 20) and then you are sure in the mousemove event, that it exists? No If statement in the mouse move to fire!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed! I just created it at position (0,0) and hid it.

Comment on lines 38 to 40
if (cursorCircle) {
cursorCircle.hide();
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

same as above.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed.

Comment on lines 44 to 46
if (cursorCircle) {
cursorCircle.show();
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

same as above.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed.

Copy link
Collaborator

@pawellysy pawellysy left a comment

Choose a reason for hiding this comment

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

Nice job!

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.

2 participants