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

Add annotation information to ChartMetadata #6136

Merged
merged 2 commits into from Oct 19, 2018

Conversation

kristw
Copy link
Contributor

@kristw kristw commented Oct 18, 2018

Add annotation information to ChartMetadata

  • canBeAnnotation : List the annotation types that the chart can be use as a source.
  • supportedAnnotations : List the annotation types that can be added to this chart.

@williaster @graceguo-supercat @conglei @michellethomas

Copy link
Contributor

@williaster williaster left a comment

Choose a reason for hiding this comment

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

LGTM overall! left a couple of comment/questions, lmk wyt!

show = true,
canBeAnnotation = [],
Copy link
Contributor

Choose a reason for hiding this comment

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

canBeAnnotationTypes / supportedAnnotationTypes might be marginally clearer, but I'm okay with canBeAnnotation / supportedAnnotations, too.

if going with canBeAnnotation / supportedAnnotations, maybe we should also make canBeAnnotation plural for consistency? => canBeAnnotations?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I like canBeAnnotationTypes / supportedAnnotationTypes. Was overthinking about singular/plural thing. I think your suggestion makes sense.

lookup[type] = true;
return lookup;
}, {});
this.supportedAnnotations = supportedAnnotations;
Copy link
Contributor

Choose a reason for hiding this comment

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

any reason to not store these with the same data structure? (don't have strong opinion, mostly curious how you were thinking about it)

Copy link
Contributor Author

@kristw kristw Oct 18, 2018

Choose a reason for hiding this comment

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

I have same concern about storing as different data structure too. The benefit is it is better for performance.

When a user select annotation type TIME_SERIES, the ui need to loop through all vis to figure out which vis can be used as annotation source for TIME_SERIES in addition to NATIVE source. An object can provide immediate lookup with better perf than array. Although it is a very small array so doesn't really matter much.

Can store it as another field name to distinguish. Not sure what would be a good name.

@williaster williaster added this to In progress in Embeddable Charts via automation Oct 18, 2018
@kristw kristw closed this Oct 18, 2018
Embeddable Charts automation moved this from In progress to Done Oct 18, 2018
@kristw kristw reopened this Oct 18, 2018
Embeddable Charts automation moved this from Done to In progress Oct 18, 2018
@codecov-io
Copy link

codecov-io commented Oct 18, 2018

Codecov Report

Merging #6136 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #6136   +/-   ##
=======================================
  Coverage   76.91%   76.91%           
=======================================
  Files          47       47           
  Lines        9362     9362           
=======================================
  Hits         7201     7201           
  Misses       2161     2161

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4e2341a...36bec63. Read the comment docs.

@kristw kristw mentioned this pull request Oct 18, 2018
@williaster williaster merged commit 9d01af2 into apache:master Oct 19, 2018
Embeddable Charts automation moved this from In progress to Done Oct 19, 2018
@kristw kristw deleted the kristw-anno branch October 19, 2018 01:03
bipinsoniguavus pushed a commit to ThalesGroup/incubator-superset that referenced this pull request Dec 26, 2018
* add annotations information to ChartMetadata

* rename fields
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 0.34.0 labels Feb 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 0.34.0
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

None yet

4 participants