Selaa lähdekoodia

开启boost渲染 --虽然不知为什么但确实解决了初次渲染展示不全的问题

Karsa 2 vuotta sitten
vanhempi
commit
66ed148bae
2 muutettua tiedostoa jossa 4 lisäystä ja 2 poistoa
  1. 1 1
      src/components/chart.vue
  2. 3 1
      src/utils/chartOptions.ts

+ 1 - 1
src/components/chart.vue

@@ -5,7 +5,7 @@
 
 <script lang="ts">
 import { defineComponent, ref, watch, onMounted, PropType } from 'vue';
-// import Highcharts from 'highcharts/highstock';
+import Highcharts from 'highcharts/highstock';
 // import HighchartszhCN from '@/utils/highcahrts-zh_CN';
 import { defaultOpts } from '@/utils/chartOptions';
 

+ 3 - 1
src/utils/chartOptions.ts

@@ -33,11 +33,13 @@ export const defaultOpts = {
   //版权信息
   credits: { enabled: false },
   boost: {
-    useGPUTranslations: true
+    useGPUTranslations: true,
+    seriesThreshold: 2
   },
   //数据列通用配置
   plotOptions: {
     series: {
+      animation: false,
       turboThreshold: 0, //不限制数据点个数
       boostThreshold: 1,
       dataGrouping: {