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

Histogram / Category widget #822

Merged
merged 12 commits into from
Jul 1, 2019

Conversation

rjimenezda
Copy link
Contributor

@rjimenezda rjimenezda commented Jun 28, 2019

Fix #811
Fix #810
Fix #771

image

I added some features to the widget class. We'll need some options to pass down to the bridge, and we might want to add some extra options for the components themselves.

For instance, the category widget should probably have some height limitations and a way to tweak max visible categories.

test/test_utils.py Outdated Show resolved Hide resolved
test/test_utils.py Outdated Show resolved Hide resolved
cartoframes/utils.py Show resolved Hide resolved
cartoframes/utils.py Show resolved Hide resolved
cartoframes/utils.py Show resolved Hide resolved
@rjimenezda
Copy link
Contributor Author

I've also taken the chance to fix the always present legends panel, and given it a readable title.

@rjimenezda rjimenezda marked this pull request as ready for review June 28, 2019 17:43
@@ -1,11 +1,11 @@
{% include 'utils/format.js.j2' %}

function renderWidget(layer, widget, variable, layerIndex, widgetIndex=0) {
const element = document.querySelector(`#layer${layerIndex}_widget${widgetIndex}-${widget.name}`);
const element = widget.element;
Copy link
Contributor

Choose a reason for hiding this comment

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

😍

}
else:
return {}

def has_variable(self):
return self._type == 'formula'
Copy link
Contributor

Choose a reason for hiding this comment

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

👍

Copy link
Contributor

@elenatorro elenatorro left a comment

Choose a reason for hiding this comment

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

LGTM!! Great work ✨ As we've talked, we'll have to define when a widget has to be updated when interacting with the visualization, but we can merge it and continue with this refactor in next issues 👍

@rjimenezda rjimenezda merged commit 4b05810 into develop Jul 1, 2019
@rjimenezda rjimenezda deleted the feature/811-810-histogram-category-widget branch July 1, 2019 14:52
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.

Add Category Widget Add Histogram Widget Responsive panel tab shows when there's no legend
3 participants