hammer: minor refactoring
@@ -45,53 +45,41 @@ class Chart(Base):
itemstyle_opts: Union[opts.ItemStyleOpts, dict, None] = None,
**kwargs,
):
- _series = self.options.get("series")
+ for s in self.options.get("series"):
if label_opts:
- for s in _series:
s.update(label=label_opts)
if linestyle_opts:
- for s in _series:
s.update(lineStyle=linestyle_opts)
if splitline_opts:
- for s in _series:
s.update(splitLine=splitline_opts)
if areastyle_opts:
- for s in _series:
s.update(areaStyle=areastyle_opts)
if axisline_opts:
- for s in _series:
s.update(axisLine=axisline_opts)
if markpoint_opts:
- for s in _series:
s.update(markPoint=markpoint_opts)
if markline_opts:
- for s in _series:
s.update(markLine=markline_opts)
if markarea_opts:
- for s in _series:
s.update(markArea=markarea_opts)
if effect_opts:
- for s in _series:
s.update(rippleEffect=effect_opts)
if tooltip_opts:
- for s in _series:
s.update(tooltip=tooltip_opts)
if itemstyle_opts:
- for s in _series:
s.update(itemStyle=itemstyle_opts)
if len(kwargs) > 0:
- for s in _series:
s.update(kwargs)
return self
