Skip to content

Commit

Permalink
Merge pull request plotly#483 from mako-npm/Add_restyle_prop
Browse files Browse the repository at this point in the history
Modified Graph.react.js to include restyle event
  • Loading branch information
alexcjohnson committed Mar 18, 2019
1 parent 74b2c36 commit c5a63be
Show file tree
Hide file tree
Showing 42 changed files with 617 additions and 204 deletions.
3 changes: 1 addition & 2 deletions packages/dash-core-components/DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ Title: Core component suite for Dash
Version: 0.44.0
Authors @R: as.person(c(Chris Parmer <[email protected]>))
Description: Core component suite for Dash
Depends: R (>= 3.0.2)
Imports: dashR
Depends: R (>= 3.5.0)
Suggests: testthat, roxygen2
License: MIT + file LICENSE
URL: https://github.com/plotly/dash-core-components
Expand Down
16 changes: 16 additions & 0 deletions packages/dash-core-components/R/coreLoading.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# AUTO GENERATED FILE - DO NOT EDIT

coreLoading <- function(children=NULL, id=NULL, type=NULL, fullscreen=NULL, debug=NULL, className=NULL, style=NULL, color=NULL, loading_state=NULL) {

component <- list(
props = list(children=children, id=id, type=type, fullscreen=fullscreen, debug=debug, className=className, style=style, color=color, loading_state=loading_state),
type = 'Loading',
namespace = 'dash_core_components',
propNames = c('children', 'id', 'type', 'fullscreen', 'debug', 'className', 'style', 'color', 'loading_state'),
package = 'dashCoreComponents'
)

component$props <- filter_null(component$props)

structure(component, class = c('dash_component', 'list'))
}
6 changes: 3 additions & 3 deletions packages/dash-core-components/R/dccGraph.R
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# AUTO GENERATED FILE - DO NOT EDIT

dccGraph <- function(id=NULL, clickData=NULL, clickAnnotationData=NULL, hoverData=NULL, clear_on_unhover=NULL, selectedData=NULL, relayoutData=NULL, figure=NULL, style=NULL, className=NULL, animate=NULL, animation_options=NULL, config=NULL, loading_state=NULL) {
dccGraph <- function(id=NULL, clickData=NULL, clickAnnotationData=NULL, hoverData=NULL, clear_on_unhover=NULL, selectedData=NULL, relayoutData=NULL, restyleData=NULL, figure=NULL, style=NULL, className=NULL, animate=NULL, animation_options=NULL, config=NULL, loading_state=NULL) {

component <- list(
props = list(id=id, clickData=clickData, clickAnnotationData=clickAnnotationData, hoverData=hoverData, clear_on_unhover=clear_on_unhover, selectedData=selectedData, relayoutData=relayoutData, figure=figure, style=style, className=className, animate=animate, animation_options=animation_options, config=config, loading_state=loading_state),
props = list(id=id, clickData=clickData, clickAnnotationData=clickAnnotationData, hoverData=hoverData, clear_on_unhover=clear_on_unhover, selectedData=selectedData, relayoutData=relayoutData, restyleData=restyleData, figure=figure, style=style, className=className, animate=animate, animation_options=animation_options, config=config, loading_state=loading_state),
type = 'Graph',
namespace = 'dash_core_components',
propNames = c('id', 'clickData', 'clickAnnotationData', 'hoverData', 'clear_on_unhover', 'selectedData', 'relayoutData', 'figure', 'style', 'className', 'animate', 'animation_options', 'config', 'loading_state'),
propNames = c('id', 'clickData', 'clickAnnotationData', 'hoverData', 'clear_on_unhover', 'selectedData', 'relayoutData', 'restyleData', 'figure', 'style', 'className', 'animate', 'animation_options', 'config', 'loading_state'),
package = 'dashCoreComponents'
)

Expand Down
6 changes: 3 additions & 3 deletions packages/dash-core-components/R/internal.R
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
.dashCoreComponents_js_metadata <- function() {
deps_metadata <- list(`dash_core_components_0` = structure(list(name = "dash_core_components_0",
version = "0", src = list(href = NULL,
file = "deps"), meta = NULL,
file = "deps/"), meta = NULL,
script = "plotly-1.45.0.min.js",
stylesheet = NULL, head = NULL, attachment = NULL, package = "dashCoreComponents",
all_files = FALSE), class = "html_dependency"),
`dash_core_components` = structure(list(name = "dash_core_components",
version = "0", src = list(href = NULL,
file = "deps"), meta = NULL,
file = "deps/"), meta = NULL,
script = "dash_core_components.min.js",
stylesheet = NULL, head = NULL, attachment = NULL, package = "dashCoreComponents",
all_files = FALSE), class = "html_dependency"),
`dash_core_components` = structure(list(name = "dash_core_components",
version = "0", src = list(href = NULL,
file = "deps"), meta = NULL,
file = "deps/"), meta = NULL,
script = "dash_core_components.min.js.map",
stylesheet = NULL, head = NULL, attachment = NULL, package = "dashCoreComponents",
all_files = FALSE), class = "html_dependency"))
Expand Down
8 changes: 5 additions & 3 deletions packages/dash-core-components/dash_core_components/Graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ class Graph(Component):
- selectedData (dict; optional): Data from latest select event
- relayoutData (dict; optional): Data from latest relayout event which occurs
when the user zooms or pans on the plot
- restyleData (dict; optional): Data from latest restyle event which occurs
when the user toggles a legend item
- figure (dict; optional): Plotly `figure` object. See schema:
https://plot.ly/javascript/reference
Only supports `data` array and `layout` object.
Expand Down Expand Up @@ -93,12 +95,12 @@ class Graph(Component):
- prop_name (string; optional): Holds which property is loading
- component_name (string; optional): Holds the name of the component that is loading"""
@_explicitize_args
def __init__(self, id=Component.UNDEFINED, clickData=Component.UNDEFINED, clickAnnotationData=Component.UNDEFINED, hoverData=Component.UNDEFINED, clear_on_unhover=Component.UNDEFINED, selectedData=Component.UNDEFINED, relayoutData=Component.UNDEFINED, figure=Component.UNDEFINED, style=Component.UNDEFINED, className=Component.UNDEFINED, animate=Component.UNDEFINED, animation_options=Component.UNDEFINED, config=Component.UNDEFINED, loading_state=Component.UNDEFINED, **kwargs):
self._prop_names = ['id', 'clickData', 'clickAnnotationData', 'hoverData', 'clear_on_unhover', 'selectedData', 'relayoutData', 'figure', 'style', 'className', 'animate', 'animation_options', 'config', 'loading_state']
def __init__(self, id=Component.UNDEFINED, clickData=Component.UNDEFINED, clickAnnotationData=Component.UNDEFINED, hoverData=Component.UNDEFINED, clear_on_unhover=Component.UNDEFINED, selectedData=Component.UNDEFINED, relayoutData=Component.UNDEFINED, restyleData=Component.UNDEFINED, figure=Component.UNDEFINED, style=Component.UNDEFINED, className=Component.UNDEFINED, animate=Component.UNDEFINED, animation_options=Component.UNDEFINED, config=Component.UNDEFINED, loading_state=Component.UNDEFINED, **kwargs):
self._prop_names = ['id', 'clickData', 'clickAnnotationData', 'hoverData', 'clear_on_unhover', 'selectedData', 'relayoutData', 'restyleData', 'figure', 'style', 'className', 'animate', 'animation_options', 'config', 'loading_state']
self._type = 'Graph'
self._namespace = 'dash_core_components'
self._valid_wildcard_attributes = []
self.available_properties = ['id', 'clickData', 'clickAnnotationData', 'hoverData', 'clear_on_unhover', 'selectedData', 'relayoutData', 'figure', 'style', 'className', 'animate', 'animation_options', 'config', 'loading_state']
self.available_properties = ['id', 'clickData', 'clickAnnotationData', 'hoverData', 'clear_on_unhover', 'selectedData', 'relayoutData', 'restyleData', 'figure', 'style', 'className', 'animate', 'animation_options', 'config', 'loading_state']
self.available_wildcard_properties = []

_explicit_args = kwargs.pop('_explicit_args')
Expand Down

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

119 changes: 119 additions & 0 deletions packages/dash-core-components/dash_core_components/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,13 @@
"required": false,
"description": "Dash-assigned callback that gets fired when the value changes."
},
"children": {
"type": {
"name": "any"
},
"required": false,
"description": "The children to hijack clicks from and display the popup."
},
"loading_state": {
"type": {
"name": "shape",
Expand Down Expand Up @@ -1257,6 +1264,17 @@
"computed": false
}
},
"restyleData": {
"type": {
"name": "object"
},
"required": false,
"description": "Data from latest restyle event which occurs\nwhen the user toggles a legend item",
"defaultValue": {
"value": "null",
"computed": false
}
},
"figure": {
"type": {
"name": "object"
Expand Down Expand Up @@ -2103,6 +2121,13 @@
"required": false,
"description": ""
},
"children": {
"type": {
"name": "node"
},
"required": false,
"description": ""
},
"loading_state": {
"type": {
"name": "shape",
Expand Down Expand Up @@ -2141,6 +2166,24 @@
"required": false,
"description": ""
},
"children": {
"type": {
"name": "union",
"value": [
{
"name": "arrayOf",
"value": {
"name": "node"
}
},
{
"name": "node"
}
]
},
"required": false,
"description": "Array that holds components to render"
},
"type": {
"type": {
"name": "enum",
Expand Down Expand Up @@ -2437,6 +2480,24 @@
"computed": false
}
},
"children": {
"type": {
"name": "union",
"value": [
{
"name": "string"
},
{
"name": "arrayOf",
"value": {
"name": "string"
}
}
]
},
"required": false,
"description": "A markdown string (or array of strings) that adhreres to the CommonMark spec"
},
"loading_state": {
"type": {
"name": "shape",
Expand Down Expand Up @@ -3073,6 +3134,24 @@
"required": false,
"description": ""
},
"children": {
"type": {
"name": "union",
"value": [
{
"name": "string"
},
{
"name": "arrayOf",
"value": {
"name": "string"
}
}
]
},
"required": false,
"description": "The text to display and highlight"
},
"language": {
"type": {
"name": "string"
Expand Down Expand Up @@ -3205,6 +3284,13 @@
"required": false,
"description": "The tab's label"
},
"children": {
"type": {
"name": "node"
},
"required": false,
"description": "The content of the tab - will only be displayed if this tab is selected"
},
"value": {
"type": {
"name": "string"
Expand Down Expand Up @@ -3398,6 +3484,24 @@
"computed": false
}
},
"children": {
"type": {
"name": "union",
"value": [
{
"name": "arrayOf",
"value": {
"name": "node"
}
},
{
"name": "node"
}
]
},
"required": false,
"description": "Array that holds Tab components"
},
"colors": {
"type": {
"name": "shape",
Expand Down Expand Up @@ -3792,6 +3896,21 @@
"required": false,
"description": "The last modified date of the file that was uploaded in unix time\n(seconds since 1970)."
},
"children": {
"type": {
"name": "union",
"value": [
{
"name": "node"
},
{
"name": "string"
}
]
},
"required": false,
"description": "Contents of the upload component"
},
"accept": {
"type": {
"name": "string"
Expand Down
Loading

0 comments on commit c5a63be

Please sign in to comment.