Skip to content

Commit

Permalink
Update style props and example
Browse files Browse the repository at this point in the history
  • Loading branch information
alisaono authored and sanjaypojo committed Mar 9, 2018
1 parent 361c29e commit e85e0f7
Show file tree
Hide file tree
Showing 3 changed files with 7,680 additions and 4,823 deletions.
28 changes: 9 additions & 19 deletions examples/ScatterExample.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,26 +48,19 @@ class ScatterExample extends React.Component {
{optionName: "groupKey", name: "Group By", optionType: "hidden", initialValue: "gender"},
{optionName: "weightKey", name: "Node Weight", optionType: "hidden", initialValue: "shoeSize"},
{optionName: "showLegend", name: "Show Legend", optionType: "bool", initialValue: true},
{optionName: "axisColor", name: "Axis Color", optionType: "field", input: "string", initialValue: ColorTheme[this.props.palette].axisColor},
{optionName: "labelColor", name: "Label Color", optionType: "field", input: "string", initialValue: ColorTheme[this.props.palette].axisColor},
{optionName: "gridColor", name: "Grid Color", optionType: "field", input: "string", initialValue: ColorTheme[this.props.palette].axisColor},
{optionName: "tickColor", name: "Ticks Color", optionType: "field", input: "string", initialValue: ColorTheme[this.props.palette].axisColor},
{optionName: "axisWidth", name: "Axis Line Width", optionType: "field", input: "number", initialValue: 1.5},
{optionName: "legendFontColor", name: "Legend Color", optionType: "field", input: "string", initialValue: ColorTheme[this.props.palette].axisColor},
{optionName: "showBorder", name: "Show Legend Border", optionType: "bool", initialValue: false},
{optionName: "legendBorderColor", name: "Legend Border Color", optionType: "field", input: "string", initialValue: ColorTheme[this.props.palette].axisColor},
],
}
}

render() {
let axisColorOptions = [
{optionName: "axisColor", name: "Axis Color", optionType: "field", input: "string", initialValue: ColorTheme[this.props.palette].axisColor},
{optionName: "labelColor", name: "Label Color", optionType: "field", input: "string", initialValue: ColorTheme[this.props.palette].axisColor},
{optionName: "gridColor", name: "Grid Color", optionType: "field", input: "string", initialValue: ColorTheme[this.props.palette].axisColor},
{optionName: "lineWidth", name: "Axis Line Width", optionType: "field", input: "number", initialValue: 1.5},
]
let legendColorOptions = [
{optionName: "fontColor", name: "Legend Color", optionType: "field", input: "string", initialValue: ColorTheme[this.props.palette].axisColor},
{optionName: "showBorder", name: "Show Legend Border", optionType: "bool", initialValue: false},
{optionName: "borderColor", name: "Legend Border Color", optionType: "field", input: "string", initialValue: ColorTheme[this.props.palette].axisColor},
]
let graphStyle = [
{optionName: "trendlineColor", name: "Trendline Color", optionType: "field", input: "string", initialValue: ColorTheme[this.props.palette].axisColor},
{optionName: "trendlineOpacity", name: "Trendline Opacity", optionType: "field", input: "number", initialValue: 0.5}
]
let style = {
title: {
fontSize: "45px",
Expand All @@ -83,10 +76,7 @@ class ScatterExample extends React.Component {
<h1 style={style.title}> Scatter Plot </h1>
<ComponentContainer optionList={this.state.optionList}
optionsData={style.optionsData}
palette={this.props.palette}
axisColorOptions={axisColorOptions}
legendColorOptions={legendColorOptions}
graphStyle={graphStyle}>
palette={this.props.palette}>
<ScatterPlot data={this.state.optionList[0].initialValue}
color={ColorTheme[this.props.palette].scatterPalette}/>
</ComponentContainer>
Expand Down
Loading

0 comments on commit e85e0f7

Please sign in to comment.