如何在 Amcharts-Stockchart 中应用样式

How to apply styles in Amchart-Stockchart

我正在尝试在我自己的 Amchart-Stockchart 中应用各种样式,其中一个可以在 https://codepen.io/Volabos/pen/xywPdb

中查看

但是我未能应用以下 2 种样式:

  1. 我想 fill the area under line 直到 x 轴具有光 Alpha 值。我找到了一个带有 fillAlpha 的选项,但是我无法应用此选项。
  2. Zoom 选项中,我想应用不同的样式,例如不同缩放选项、字体等的不同背景颜色。我想知道我是否可以在各种 Divs 中扭曲它们并将它们放置在网页中其他合适的空间中。

有可能实现吗?任何指针将不胜感激。

属性 称为 fillAlphas - 您在末尾缺少 s

stockGraphs: [{
  // ...
  fillAlphas: .5
},
// ...
]

这也是设置填充颜色的情况 - 属性 是 fillColorss。如果您想使用与数据集中指定的颜色不同的颜色,则需要将 useDataSetColors 设置为 false。

您不能将 periodSelector 缩放选项包裹在 div 中并像使用图例那样移动它们。您可以通过设置 addClassNames to true and apply the desired CSS to the elements associated with the period selector using the classes listed here 来设置 periodSelector 组件的样式。请注意,您可以通过将 position 属性 设置为 "top""left""right""bottom" 来定位 periodSelector。 =30=]

这是 demo 说明 fillAlphasaddClassNames