增加CandlestickChartK线图 #124

This commit is contained in:
monitor1394
2021-03-10 13:03:36 +08:00
parent 0eeacdebe7
commit 555e6d47ca
28 changed files with 708 additions and 22 deletions

View File

@@ -25,6 +25,7 @@ __Main component:__
* [Serie-Gauge](#Serie-Gauge)
* [Serie-Ring](#Serie-Ring)
* [Serie-Liquid](#Serie-Liquid)
* [Serie-Candlestick](#Serie-Candlestick)
* [Settings](#Settings)
* [Theme](#Theme)
* [Title](#Title)
@@ -643,6 +644,29 @@ Line chart serie.
* `animation`: 起始动画 [SerieAnimation](#SerieAnimation)。
* `data`: 系列中的数据项 [SerieData](#SerieData) 数组,可以设置`1``n`维数据。水位图的数据一般只有一个,表示当前水位值,用`max`设置最大水位值。
## `Serie-Candlestick`
K线图系列。
* `show`:系列是否显示在图表上。
* `type``Candlestick`
* `name`:系列名称。用于 `tooltip` 的显示,`legend` 的图例筛选。
* `xAxisIndex`使用的坐标轴X轴的 `index`,在单个图表实例中存在多个坐标轴的时候有用。
* `yAxisIndex`使用的坐标轴Y轴的 `index`,在单个图表实例中存在多个坐标轴的时候有用。
* `minShow`:系列显示数据的最小索引。
* `maxShow`:系列显示数据的最大索引。
* `maxCache`:系列中可缓存的最大数据量。默认为`0`没有限制大于0时超过指定值会移除旧数据再插入新数据。
* `clip`:是否裁剪超出坐标系部分的图形。
* `ignore`:是否开启忽略数据。当为 `true` 时,数据值为 `ignoreValue` 时不进行绘制。
* `ignoreValue`忽略数据的默认值。默认值默认为0`ignore``true` 才有效。
* `showAsPositiveNumber`:将负数数值显示为正数。一般和`AxisLabel``showAsPositiveNumber`配合使用。仅在折线图和柱状图中有效。
* `large`:是否开启大数据量优化,在数据图形特别多而出现卡顿时候可以开启。开启后配合 largeThreshold 在数据量大于指定阈值的时候对绘制进行优化。缺点优化后不能自定义设置单个数据项的样式不能显示Label折线图不绘制Symbol。
* `largeThreshold`开启大数量优化的阈值。只有当开启了large并且数据量大于该阀值时才进入性能模式。
* `itemStyle`:环形图的圆环样式,包括设置背景颜色和边框等 [ItemStyle](#ItemStyle)。
* `emphasis`:高亮样式 [Emphasis](#Emphasis)。
* `animation`:起始动画 [SerieAnimation](#SerieAnimation)。
* `data`:系列中的数据项 [SerieData](#SerieData) 数组K线图至少需要4个维度的数组`[open, close, lowest, highest]`
## `Settings`
全局参数设置组件。一般情况下可使用默认值,当有需要时可进行调整。
@@ -739,15 +763,17 @@ Line chart serie.
## `ItemStyle`
* `show`: 是否启用。
* `color`: 颜色。
* `toColor`gradient color1.
* `toColor2`gradient color2.
* `color`: 颜色。对于K线图对应阳线的颜色。
* `color0`: 颜色。对于K线图对应阴线的颜色。
* `toColor`: 渐变颜色1。
* `toColor2`: 渐变颜色2。只在折线图中有效。
* `backgroundColor`: 背景颜色。
* `backgroundWidth`: 背景的宽。
* `centerColor`: 中心区域的颜色。如环形图的中心区域。
* `centerGap`: 中心区域的间隙。如环形图的中心区域于最内环的间隙。
* `borderType`: 边框的类型。
* `borderColor`: 边框的颜色。
* `borderColor`: 边框的颜色。对于K线图对应阳线的边框颜色。
* `borderColor0`: 边框的颜色。对于K线图对应阴线的边框颜色。
* `borderWidth`: 边框宽。
* `opacity`: 透明度。
* `tooltipFormatter`: 提示框单项的字符串模版格式器。具体配置参考`Tooltip``formatter`
@@ -776,8 +802,8 @@ Line chart serie.
* `DashDot`: 点划线。
* `DashDotDot`: 双点划线。
* `color`: 线条颜色。默认和 `serie` 一致。
* `toColor`线的渐变颜色(需要水平方向渐变时)。
* `toColor2`线的渐变颜色2需要水平方向三个渐变色的渐变时
* `toColor`: 线的渐变颜色(需要水平方向渐变时)。
* `toColor2`: 线的渐变颜色2需要水平方向三个渐变色的渐变时
* `width`: 线条宽。
* `opacity`: 线条的透明度。支持从 `0``1` 的数字,为 `0` 时不绘制该图形。