Skip to content

Commit

Permalink
🔨 minor refactoring (pyecharts#1181)
Browse files Browse the repository at this point in the history
  • Loading branch information
chfw authored and chenjiandongx committed Jun 10, 2019
1 parent 0e61605 commit dce23cc
Showing 1 changed file with 13 additions and 25 deletions.
38 changes: 13 additions & 25 deletions pyecharts/charts/chart.py
Original file line number Diff line number Diff line change
@@ -45,53 +45,41 @@ def set_series_opts(
itemstyle_opts: Union[opts.ItemStyleOpts, dict, None] = None,
**kwargs,
):
_series = self.options.get("series")
if label_opts:
for s in _series:
for s in self.options.get("series"):
if label_opts:
s.update(label=label_opts)

if linestyle_opts:
for s in _series:
if linestyle_opts:
s.update(lineStyle=linestyle_opts)

if splitline_opts:
for s in _series:
if splitline_opts:
s.update(splitLine=splitline_opts)

if areastyle_opts:
for s in _series:
if areastyle_opts:
s.update(areaStyle=areastyle_opts)

if axisline_opts:
for s in _series:
if axisline_opts:
s.update(axisLine=axisline_opts)

if markpoint_opts:
for s in _series:
if markpoint_opts:
s.update(markPoint=markpoint_opts)

if markline_opts:
for s in _series:
if markline_opts:
s.update(markLine=markline_opts)

if markarea_opts:
for s in _series:
if markarea_opts:
s.update(markArea=markarea_opts)

if effect_opts:
for s in _series:
if effect_opts:
s.update(rippleEffect=effect_opts)

if tooltip_opts:
for s in _series:
if tooltip_opts:
s.update(tooltip=tooltip_opts)

if itemstyle_opts:
for s in _series:
if itemstyle_opts:
s.update(itemStyle=itemstyle_opts)

if len(kwargs) > 0:
for s in _series:
if len(kwargs) > 0:
s.update(kwargs)

return self

0 comments on commit dce23cc

Please sign in to comment.