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

Added dropdown to Legend for dataPointThreshold #32

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

Conversation

ignis-sec
Copy link

Hey everyone,
I stumbled upon arduino-ide/#803 which has been unresolved since Feb 2, 2022. This pull request addresses that issue.

I added a small dropdown to the Legend component which allows modification of the dataPointThreshold, which is used to determine the maximum number of datapoints that will be shown in the serial plotter.

This pull request introduces:

Tested with the master branch of arduino/arduino-ide, found no potential issues.

image
image
image
image

@CLAassistant
Copy link

CLAassistant commented Jul 29, 2023

CLA assistant check
All committers have signed the CLA.

@ignis-sec

This comment was marked as resolved.

@codecov-commenter
Copy link

codecov-commenter commented Jul 29, 2023

Codecov Report

Patch and project coverage have no change.

Comparison is base (22c6952) 87.71% compared to head (d417cb0) 87.71%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #32   +/-   ##
=======================================
  Coverage   87.71%   87.71%           
=======================================
  Files           1        1           
  Lines          57       57           
  Branches       12       12           
=======================================
  Hits           50       50           
  Misses          3        3           
  Partials        4        4           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@per1234 per1234 added type: enhancement Proposed improvement topic: code Related to content of the project itself labels Jul 29, 2023
@SvenRosvall
Copy link

Nice!
Can you reduce the width of the combo-box, and also change its text to something shorter like "Datapoints".
The space in the legend is precious. I usually plot several values. I am worried that there won't be enough space to show more than a 1-2 value titles.

@ignis-sec
Copy link
Author

@SvenRosvall that is fair enough, as a lazy bum who never titles their plots, I did not anticipate it could be an issue.
I've pushed an additional commit doing my best to minimize the space it takes up.

image
image

@SvenRosvall
Copy link

Looks good. Thanks @ignis-sec .

@Farhankhosravi

This comment was marked as duplicate.

@wgrover

This comment was marked as duplicate.

@wgrover
Copy link

wgrover commented Jan 28, 2024

In the meantime, I've created a couple videos to guide my students through editing the Serial Plotter's JavaScript source to manually adjust the number of points in their Plotter history. I figured I'd post them here in case they're useful to anyone:

Changing the Serial Plotter history length in the Arduino IDE on a Mac

Changing the Serial Plotter history length in the Arduino IDE on Windows

@natecermak

This comment was marked as duplicate.

@Farhankhosravi

This comment was marked as duplicate.

@beyarkay
Copy link

beyarkay commented Jun 6, 2024

If anyone wants something quick and dirty which 1) increases the maximum number of data points to 500 and 2) increases the number of lines you can draw to 20, using the matplotlib tab20 colour pallete:

Screenshot 2024-06-06 at 22 10 15

Then download this file: main.35ae02cb.chunk.js.txt, remove the .txt file extension so it's just main.35ae02cb.chunk.js, and replace the file at /Applications/Arduino IDE.app/Contents/Resources/app/lib/backend/resources/arduino-serial-plotter-webapp/static/js/main.35ae02cb.chunk.js with this file. It's possible that you'll need to change the 35ae02cb to match with whatever your main.*.chunk.js file is called.

I'm sad that it's come to this, but oh well.

@RolfHut

This comment was marked as duplicate.

@crackwitz

This comment was marked as off-topic.

@wgrover

This comment was marked as off-topic.

@crackwitz

This comment was marked as off-topic.

@beyarkay

This comment was marked as off-topic.

@arduino arduino locked as too heated and limited conversation to collaborators Jun 24, 2024
@per1234 per1234 linked an issue Jun 24, 2024 that may be closed by this pull request
3 tasks
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
topic: code Related to content of the project itself type: enhancement Proposed improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow display of more data points in Serial Plotter