|
|
@@ -6,7 +6,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script lang="ts" setup>
|
|
|
-import { shallowRef, shallowReactive, watch, computed,PropType } from 'vue'
|
|
|
+import { shallowRef, shallowReactive, watch, computed, PropType } from 'vue'
|
|
|
import { Chart } from 'hqchart'
|
|
|
import { timerInterceptor } from '@/utils/timer'
|
|
|
import { handleNumberValue } from '@/filters'
|
|
|
@@ -84,7 +84,7 @@ const period = computed(() => {
|
|
|
|
|
|
// 获取标题大小
|
|
|
const getTitleFont = () => {
|
|
|
- const size = window.devicePixelRatio * 12
|
|
|
+ const size = window.devicePixelRatio * 11
|
|
|
return size + 'px 微软雅黑'
|
|
|
}
|
|
|
|
|
|
@@ -117,10 +117,10 @@ const chartOption = {
|
|
|
HPenType: -1
|
|
|
},
|
|
|
Border: {
|
|
|
- Left: 0,
|
|
|
- Right: 0,
|
|
|
- Top: props.isShowTitle ? 36 : 10,
|
|
|
- Bottom: 36,
|
|
|
+ Left: 1,
|
|
|
+ Right: 1,
|
|
|
+ Top: props.isShowTitle ? 28 : 10,
|
|
|
+ Bottom: 28,
|
|
|
AutoLeft: { Blank: 15, MinWidth: 30 },
|
|
|
AutoRight: { Blank: 15, MinWidth: 30 },
|
|
|
},
|
|
|
@@ -132,7 +132,7 @@ const chartOption = {
|
|
|
Period: period.value,
|
|
|
PageSize: 50,
|
|
|
// 最后数据和右边框空白间距,空白的宽度=RightSpaceCount*k线宽度
|
|
|
- RightSpaceCount: 1,
|
|
|
+ RightSpaceCount: 10,
|
|
|
// https://blog.csdn.net/jones2000/article/details/104443471
|
|
|
IsShowTooltip: false,
|
|
|
KLineDoubleClick: false
|
|
|
@@ -146,17 +146,18 @@ const chartOption = {
|
|
|
Frame: [
|
|
|
{
|
|
|
SplitType: 1,
|
|
|
- IsShowRightText: false, // 是否显示Y轴右侧刻度
|
|
|
+ SplitCount: 3,
|
|
|
+ IsShowLeftText: false, // 是否显示左边的刻度
|
|
|
Custom: [
|
|
|
{
|
|
|
Type: 0,
|
|
|
- Position: 'left',
|
|
|
+ Position: 'right',
|
|
|
}
|
|
|
],
|
|
|
},
|
|
|
{
|
|
|
SplitType: 1,
|
|
|
- IsShowRightText: false, // 是否显示Y轴右侧刻度
|
|
|
+ IsShowLeftText: false, // 是否显示左边的刻度
|
|
|
}
|
|
|
],
|
|
|
OnCreatedCallback: (chart: KLineChartContainer) => {
|