jupyter / declarativewidgets

[RETIRED] Jupyter Declarative Widget Extension
http://jupyter.org/declarativewidgets/docs.html
Other
120 stars 38 forks source link

Modify nvd3 CSS rules? #524

Open MattKravetz opened 7 years ago

MattKravetz commented 7 years ago

If a dataframe contains a null value, the urth-viz-bar element displays a bar with a height of 0. My datasets contain both 0s and null values, so I would like to change this behavior such that null values are not rendered by the element.

The top answer to this StackOverflow question provides exactly what I am looking for by way of CSS override. But, I can't figure out how to make this work with the urth-viz-bar element. I tried inlining the CSS in the notebook itself, and also adding the CSS to urth-components/urth-viz-chart/urth-viz-bar.css, but neither of these approaches worked.

Is there a way that this can be done?

image

MattKravetz commented 7 years ago

Thank you for the follow-up!

This doesn't appear to be working for me. I am running off the docker_deloy repo and tried modifying the file at /opt/conda/lib/python3.5/site-packages/declarativewidgets/static/elements/urth-viz-chart/urth-viz-chart.css as you recommended. Prior to posting this issue, I had tried making the same change to the file at /opt/conda/lib/python3.5/site-packages/declarativewidgets/static/urth_components/urth-viz-chart/urth-viz-chart.css, which also didn't work.

I also tried changing the "fill: yellow" rule to "fill: red" as a test, and this also didn't work. Am I unable to modify these CSS files in a live installation?

peller commented 7 years ago

@MattKravetz modifying an installation in docker is tricky business. I think there are multiple copies of the files. Aside from running in the dev environment, I cannot recommend any other way to test. Perhaps @lbustelo has a suggestion, or someone else can validate the change and we can cut a new release.