This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Histogram extends React.Component { | |
| constructor(props) { | |
| super(props); | |
| this.histogramRef = React.createRef(); | |
| } | |
| componentDidMount() { | |
| this._createView(); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Source: https://gist.github.com/dgrtwo/eb7750e74997891d7c20 | |
| # Source: https://github.com/hadley/ggplot2/blob/master/R/geom-violin.r | |
| # Last update: Wednesday, July 29, 2020 | ggplot2 3.3.2 | |
| library(ggplot2) | |
| library(dplyr) | |
| library(grid) | |
| "%||%" <- function(a, b) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "editor.formatOnSave": true, | |
| "python.formatting.provider": "black", | |
| "python.linting.enabled": true, | |
| "python.linting.lintOnSave": true, | |
| "python.linting.flake8Enabled": true, | |
| "python.linting.flake8Args": [ | |
| "--ignore=E501,W503", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def y_axis(): | |
| return { | |
| "config": { | |
| "axisY": { | |
| "domain": False, | |
| "tickSize": 10, | |
| "gridDash": [2, 4] | |
| }, | |
| "view": { | |
| "stroke": "transparent", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| alt.themes.register("y_axis", y_axis) | |
| alt.themes.enable("y_axis") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from setuptools import setup | |
| ENTRY_POINTS = { | |
| "altair.vegalite.v4.theme": [ | |
| "feedzai = feedzai_altair_theme.theme:feedzai", | |
| ], | |
| } | |
| setup(name="feedzai-altair-theme", entry_points=ENTRY_POINTS) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import altair as alt | |
| alt.themes.enable("feedzai") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Sneak peek of the theme configuration: | |
| def feedzai(): | |
| """Feedzai theme (light theme).""" | |
| return { | |
| "config": { | |
| # Guides | |
| "axis": { | |
| "domain": True, | |
| "domainColor": COLORS["axis"], |