Rename `Chart` to `View`?
See original GitHub issueSince both Track
and View
are important concepts in Gosling, I think we can support explicit functions for both in the python package as well. In this regard, I was wondering whether it makes sense to rename Chart
to View
since Chart()
looks to construct Gosling’s views.
// from
gos.Chart(
title='Overview and Detail Views',
arrangement='horizontal',
views=[overview, detail_view]
)
// to
gos.View(
title='Overview and Detail Views',
arrangement='horizontal',
views=[overview, detail_view] // two children views that are nested in this parent view
)
So, at the root level, users define a View
, and it can contain either multiple View
s or Track
s.
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
Rename a chart - Microsoft Support
Renaming a chart is simple: Select the chart title text that you want to change. Type the new chart title.
Read more >Chart Name in Excel 2016 - Stack Overflow
You can rename a chart in two ways in Excel 2016. ... only way to immediately see the chart's name again is to...
Read more >How to Rename a Legend in an Excel Chart (Two ... - YouTube
This video tutorial describes two different ways how we can rename a legend in an Excel chart.Let's have a look at both now!...
Read more >Excel VBA Tips n Tricks #22 Rename Charts and Select Any ...
Free Workbooks: https://www.excelvbaisfun.com/links?utm_source=youtube&utm_medium=desc&utm_content=vJQr5lks5qg Join Excel Ninja Pro: ...
Read more >How to rename a data series in an Excel chart?
1. Right click the chart whose data series you will rename, and click Select Data from the right-clicking menu. See screenshot:.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Thanks for all the thoughtful ideas. This is sort of what I had in mind already and have started implementing to some extent.
Completely agree. I’m thinking that for now, we don’t expose the
PartialTrack
and instead just work with completeTrack
’s. This will make the JSON larger at the end, but that is OK IMO. If it becomes an issue, we can always write a script to strip out duplicated (unecessary) fields 😃Additionally, thank you for all the examples and explanation. It helps a lot for me to understand gosling’s data-model much better. You have actually identified a bug with the current implementation. The class
Track
should only be able to hold fields for a goslingTrack
, but theproperties
API is sneaky because it allows a hook to add additional fields (which) actually turn the Track into a View! For example,“Works” because the constructor for
Track
is called with proper arguments and passes validation. The assignment in the.properties
method adds these fields to theTrack
instance, but effectively changes the type from a track to aSingleView
. The way that the validation ends up working, this is still valid in the end. But for example if you callTrack
like below,It results in an error. The idea with
properties
is to have a nice shorthand modify the class instance. So technically,should be equivalent. The fact that the example still compiled with the
Track(data).properties(alignemnt=..., tracks=...)
confused me about what the types in gosling actually are. But now I can see clearly what’s going on.Thanks for all your help. I’m goign to work on the API today and will ping you when I have something cleaned up 😃
Another thing I realized is that Altair does not seem to expose types at all (or may a few) that are beyond a chart level. For example, instead of
alt.HConcatSpec()
, Altair let users use|
oralt.hconcat()
to generate{ hconcat: [{...}, {...}] }
specs. As I personally find them really useful, I wonder if we want to (or you are planning to) support such operations and probably deprecate the use oftracks=[...]
:If we want to support both the track and view composition, we could do something like the following?:
(Sorry, comments became too long than I expected 😅 )