Skip to content

Commit

Permalink
fix(theme): hides splitLine of category axis and axisLine of value axis
Browse files Browse the repository at this point in the history
  • Loading branch information
SevenOutman committed Jun 14, 2022
1 parent 6f8135e commit c8011b3
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 20 deletions.
3 changes: 1 addition & 2 deletions src/components/YAxis.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ function YAxis(_: YAxisProps) {

YAxis.defaultProps = {
show: true,
type: 'value',
splitLine: true
type: 'value'
};
YAxis[symbols.typeKey] = symbols.yAxis;

Expand Down
2 changes: 1 addition & 1 deletion src/theme/rsuite_light.project.json
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@
"splitAreaColor": ["rgba(250,250,250,0.3)", "rgba(200,200,200,0.3)"]
}
],
"axisSeperateSetting": false,
"axisSeperateSetting": true,
"toolboxColor": "#999999",
"toolboxEmpasisColor": "#666666",
"tooltipAxisColor": "#cccccc",
Expand Down
10 changes: 5 additions & 5 deletions src/theme/rsuite_light.ts
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ const theme = {
color: '#575757'
},
splitLine: {
show: true,
show: false,
lineStyle: {
color: ['#e5e5ea']
}
Expand All @@ -213,15 +213,15 @@ const theme = {
},
valueAxis: {
axisLine: {
show: true,
show: false,
lineStyle: {
color: '#e5e5ea'
}
},
axisTick: {
show: false,
lineStyle: {
color: '#333'
color: '#8e8e93'
}
},
axisLabel: {
Expand Down Expand Up @@ -249,7 +249,7 @@ const theme = {
}
},
axisTick: {
show: false,
show: true,
lineStyle: {
color: '#333'
}
Expand Down Expand Up @@ -279,7 +279,7 @@ const theme = {
}
},
axisTick: {
show: false,
show: true,
lineStyle: {
color: '#333'
}
Expand Down
22 changes: 10 additions & 12 deletions src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -228,9 +228,6 @@ const createOptions = {
return _merge(
{
boundaryGap: !!series.find((comp: any) => comp.type[symbols.typeKey] === symbols.bars),
splitLine: {
show: false
},
nameTextStyle: {
fontSize: 12,
color: '#575757'
Expand Down Expand Up @@ -261,22 +258,23 @@ const createOptions = {

return _merge(
{
axisLine: {
show: false
},
splitLine: _merge(
{
show: !!splitLine
},
typeof splitLine !== 'boolean' && splitLine
),
nameRotate: 0,
name: name && rest.nameLocation === 'middle' ? name.split('').join('\n') : name,
nameTextStyle: {
fontSize: 12,
color: '#575757'
}
},
typeof splitLine !== 'undefined'
? {
splitLine: _merge(
{
show: !!splitLine
},
typeof splitLine !== 'boolean' && splitLine
)
}
: {},
axisLabel
? {
axisLabel: transformTextOption(axisLabel)
Expand Down

0 comments on commit c8011b3

Please sign in to comment.