Commit 89cb2366 by jml0128

fix:数据大于30条不适用图表形式

1 parent 8b01f449
...@@ -3,6 +3,10 @@ ...@@ -3,6 +3,10 @@
* @Date: 2021-09-08 15:26:40 * @Date: 2021-09-08 15:26:40
--> -->
# 0.1.23
1. 图表数据大于 30 条后,禁止使用表格形式
# 0.1.22 # 0.1.22
1. 柱状图样式 1. 柱状图样式
......
{ {
"name": "xrk-bi", "name": "xrk-bi",
"version": "0.1.22", "version": "0.1.23",
"description": "xrk-bi", "description": "xrk-bi",
"author": "xrk", "author": "xrk",
"main": "dist/bundler.js", "main": "dist/bundler.js",
......
...@@ -406,8 +406,14 @@ export default { ...@@ -406,8 +406,14 @@ export default {
return ChartConfigFn.createConfig(dealAxis(item.topicCountInfos), { return ChartConfigFn.createConfig(dealAxis(item.topicCountInfos), {
...item, ...item,
blockTitle: item.topicTitle, blockTitle: item.topicTitle,
chartType: item.chartType || randomType([1, 2, 5, 6, 9, 10, 11]), chartType:
disableTypes: [3, 4] item.chartType ||
randomType(
item.topicCountInfos.length > 30
? [1, 2, 5, 6, 9, 10]
: [1, 2, 5, 6, 9, 10, 11]
),
disableTypes: item.topicCountInfos.length > 30 ? [3, 4, 11] : [3, 4]
}); });
}) })
.sort((a, b) => { .sort((a, b) => {
...@@ -428,7 +434,12 @@ export default { ...@@ -428,7 +434,12 @@ export default {
toggleAxisContenteditable: true, toggleAxisContenteditable: true,
blockTitle: `${item.xFactor}${item.yFactor}相关性分析`, blockTitle: `${item.xFactor}${item.yFactor}相关性分析`,
chartType: chartType:
item.chartType || randomType([1, 2, 3, 4, 5, 6, 9, 10, 11]) item.chartType ||
randomType(
item.topicCountInfos.length > 30
? [1, 2, 3, 4, 5, 6, 9, 10]
: [1, 2, 3, 4, 5, 6, 9, 10, 11]
)
}); });
}) })
.sort((a, b) => { .sort((a, b) => {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!