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 a chart picker util #3622

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Add a chart picker util #3622

wants to merge 1 commit into from

Conversation

pradh
Copy link
Contributor

@pradh pradh commented Sep 19, 2023

No description provided.

Copy link
Contributor

@shifucun shifucun left a comment

Choose a reason for hiding this comment

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

At a high-level, do we produce chart for each config with the same data? Is there a plan to cache the data fetching?

Copy link
Contributor

@juliawu juliawu left a comment

Choose a reason for hiding this comment

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

Very nice!

rel="stylesheet"
href="https://dev.datacommons.org/css/datacommons.min.css"
/>
<script src="https://dev.datacommons.org/datacommons.js"></script>
Copy link
Contributor

Choose a reason for hiding this comment

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

To confirm, are we standardizing dev.datacommons.org as the goto source for web components? (Are we going to keep pushing latest webcomponent changes to dev?)

stacked: bool = False,
lollipop: bool = False,
horizontal: bool = False):
vars_str = ' '.join(vars[:5])
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggestion: extract the 5 to a constant

f'parentPlace="{ctx.place}"',
f'childPlaceType="{ctx.child_type}"',
f'variables="{vars_str}"',
'maxPlaces="10"',
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggestion: extract the 10 to a constant

f'parentPlace="{ctx.place}"',
f'childPlaceType="{ctx.child_type}"',
f'variable="{v}"',
'rankingCount=10',
Copy link
Contributor

Choose a reason for hiding this comment

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

rankingCount isn't supported by the web components yet so this line and line 171 will get ignored.

Copy link
Contributor

Choose a reason for hiding this comment

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

Update: working on adding this now, we can leave this in for now!

Copy link
Contributor

@chejennifer chejennifer left a comment

Choose a reason for hiding this comment

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

cool

<head>
<link
rel="stylesheet"
href="https://dev.datacommons.org/css/datacommons.min.css"
Copy link
Contributor

Choose a reason for hiding this comment

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

I believe dan made changes where we don't need to include the style sheet anymore

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.

4 participants