Skip to content

Commit

Permalink
Namespace css classes + update class and style props where applicable (
Browse files Browse the repository at this point in the history
…spotify#66)

* AreaChartBar namespace

* AreaChart namespace

* AreaHeatMap namespace + accessor class and style funcs

* BarChart update documentation

* ColorHeatmap namespace and update documentation

* FunnelChart namespace and accessors

* Add lineStyle and lineClassName to KDE and remove unused prop in LineChart

* MarketLineChart namespace and class and style accessors

* RangeBarChart namespace

* ScatterPlot namespace

* PieChart documentation and updates

* XYPlot namespace and underlying components

* Add classes to linechart, remove unused styles

* Namespace SankeyDiagram and updates to PieChart

* Update tests

* Update docs

* Add backwards compatibility for markerLineClass

* Update docs

* Use className from props for RangeRect
  • Loading branch information
Kris Salvador authored May 21, 2018
1 parent fc9f6d4 commit 9f8e1f4
Show file tree
Hide file tree
Showing 50 changed files with 1,440 additions and 821 deletions.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/build/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,5 @@
</div>

<div class="container-fluid" id="container">Loading...</div>
<script type="text/javascript" src="bundle.1d04aa6c7e41f31bfafc.js"></script></body>
<script type="text/javascript" src="bundle.20490f618aca8f8ca24a.js"></script></body>
</html>
6 changes: 2 additions & 4 deletions docs/src/ComponentDocs.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,8 @@ export default class ComponentDocs extends React.Component {
</div>

{propDocs.description ? (
<div className="row">
<p className="component-description">
{renderMarkdown(propDocs.description)}
</p>
<div className="row component-description">
{renderMarkdown(propDocs.description)}
</div>
) : null}

Expand Down
11 changes: 11 additions & 0 deletions docs/src/docs/AreaChart/propDocs.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,17 @@
"required": false,
"description": "Accessor function for area's ending (maximum) Y values, called once per datum,\nor a single Y value to be used for the entire line.\nShould return the maximum of the Y range spanned by the area at this point."
},
"pathClassName": {
"type": {
"name": "string"
},
"required": false,
"description": "classname applied to area path element",
"defaultValue": {
"value": "\"\"",
"computed": false
}
},
"pathStyle": {
"type": {
"name": "object"
Expand Down
24 changes: 20 additions & 4 deletions docs/src/docs/AreaHeatmap/propDocs.json
Original file line number Diff line number Diff line change
Expand Up @@ -109,21 +109,37 @@
},
"rectClassName": {
"type": {
"name": "string"
"name": "union",
"value": [
{
"name": "string"
},
{
"name": "func"
}
]
},
"required": false,
"description": "",
"description": "Class attribute to be applied to each rect\nor accessor function which returns a class",
"defaultValue": {
"value": "\"\"",
"computed": false
}
},
"rectStyle": {
"type": {
"name": "object"
"name": "union",
"value": [
{
"name": "object"
},
{
"name": "func"
}
]
},
"required": false,
"description": "",
"description": "Inline style object to be applied to each rect,\nor accessor function which returns a style object.",
"defaultValue": {
"value": "{}",
"computed": false
Expand Down
4 changes: 2 additions & 2 deletions docs/src/docs/BarChart/propDocs.json
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@
]
},
"required": false,
"description": "Inline style object to be applied to each bar,\nor accessor function which returns a style object;",
"description": "Inline style object to be applied to each bar,\nor accessor function which returns a style object.",
"defaultValue": {
"value": "{}",
"computed": false
Expand All @@ -126,7 +126,7 @@
]
},
"required": false,
"description": "Class attribute to be applied to each bar.\nor accessor function which returns a class;",
"description": "Class attribute to be applied to each bar,\nor accessor function which returns a class.",
"defaultValue": {
"value": "\"\"",
"computed": false
Expand Down
4 changes: 2 additions & 2 deletions docs/src/docs/ColorHeatmap/propDocs.json
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@
]
},
"required": false,
"description": "",
"description": "Inline style object to be applied to each rect,\nor accessor function which returns a style object.",
"defaultValue": {
"value": "{}",
"computed": false
Expand All @@ -142,7 +142,7 @@
]
},
"required": false,
"description": "",
"description": "Class attribute to be applied to each rect,\nor accessor function which returns a class.",
"defaultValue": {
"value": "\"\"",
"computed": false
Expand Down
49 changes: 49 additions & 0 deletions docs/src/docs/FunnelChart/propDocs.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,62 @@
"required": false,
"description": ""
},
"color": {
"type": {
"name": "union",
"value": [
{
"name": "string"
},
{
"name": "func"
}
]
},
"required": false,
"description": "Color applied to the path element,\nor accessor function which returns a class.\n\nNote that the first datum's color would not be applied since it fills in the area of the path"
},
"horizontal": {
"type": {
"name": "bool"
},
"required": false,
"description": ""
},
"pathClassName": {
"type": {
"name": "union",
"value": [
{
"name": "string"
},
{
"name": "func"
}
]
},
"required": false,
"description": "Classname applied to each path element,\nor accessor function which returns a class.",
"defaultValue": {
"value": "\"\"",
"computed": false
}
},
"pathStyle": {
"type": {
"name": "union",
"value": [
{
"name": "object"
},
{
"name": "func"
}
]
},
"required": false,
"description": "Style applied to each path element,\nor accessor function which returns a style object."
},
"xScale": {
"type": {
"name": "func"
Expand Down
14 changes: 14 additions & 0 deletions docs/src/docs/KernelDensityEstimation/propDocs.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,20 @@
"computed": false
}
},
"lineStyle": {
"type": {
"name": "object"
},
"required": false,
"description": "Inline style object to be applied to the line path"
},
"lineClassName": {
"type": {
"name": "string"
},
"required": false,
"description": "Class attribute to be applied to the line path"
},
"name": {
"type": {
"name": "string"
Expand Down
38 changes: 38 additions & 0 deletions docs/src/docs/MarkerLineChart/propDocs.json
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,44 @@
"required": false,
"description": ""
},
"lineClassName": {
"type": {
"name": "union",
"value": [
{
"name": "string"
},
{
"name": "func"
}
]
},
"required": false,
"description": "Class attribute to be applied to the line path,\nor accessor function which returns a class.",
"defaultValue": {
"value": "\"\"",
"computed": false
}
},
"lineStyle": {
"type": {
"name": "union",
"value": [
{
"name": "object"
},
{
"name": "func"
}
]
},
"required": false,
"description": "Inline style object to be applied to each marker line,\nor accessor function which returns a style object.",
"defaultValue": {
"value": "{}",
"computed": false
}
},
"onMouseEnterLine": {
"type": {
"name": "func"
Expand Down
Loading

0 comments on commit 9f8e1f4

Please sign in to comment.