Skip to content

PlotDataItem setData() listOfDicts fix?#3190

Merged
j9ac9k merged 4 commits intopyqtgraph:masterfrom
kevinanewman:list-of-dicts-fix-maybe
Jan 25, 2025
Merged

PlotDataItem setData() listOfDicts fix?#3190
j9ac9k merged 4 commits intopyqtgraph:masterfrom
kevinanewman:list-of-dicts-fix-maybe

Conversation

@kevinanewman
Copy link
Copy Markdown
Contributor

@kevinanewman kevinanewman commented Nov 12, 2024

It's entirely possible I'm confused here, but the way it is now, 'data' (etc) would have to be in the list data, but then a string isn't a dict and the list interpretation fails...

So I think it should be if k in data[0], not if k in data, in other words, the same handling as 'x' and 'y'.

I should have merged first, but see commit 369a751 for the code change...

Otherwise, any help appreciated!

Thanks,
Kevin

kevinanewman and others added 4 commits November 5, 2024 11:37
set output char format to self.ouput.font for consistency
set input font to be the same as the output font for consistency
drop "TypeWriter" style hint, it seems to map to "American Typewriter" on macos, which is not fixed-width...
@j9ac9k
Copy link
Copy Markdown
Member

j9ac9k commented Jan 25, 2025

You're absolutely right. Huh, this code is ancient (git blame says from 13 years ago!) ...how did this get avoided for so long! Nice find!

@j9ac9k j9ac9k merged commit bd20235 into pyqtgraph:master Jan 25, 2025
@kevinanewman kevinanewman deleted the list-of-dicts-fix-maybe branch January 30, 2025 14:53
j9ac9k pushed a commit to j9ac9k/pyqtgraph that referenced this pull request Mar 25, 2025
* output char formats needs to be set or it can have some random font
set output char format to self.ouput.font for consistency
set input font to be the same as the output font for consistency
drop "TypeWriter" style hint, it seems to map to "American Typewriter" on macos, which is not fixed-width...

* delete comment

* I think this should be data[0], same handling as as 'x' and 'y'...
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