第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問(wèn)題,去搜搜看,總會(huì)有你想問(wèn)的

如何使用來(lái)自 CSV 的數(shù)據(jù)在 Highstock 圖表中將分鐘設(shè)置為單位

如何使用來(lái)自 CSV 的數(shù)據(jù)在 Highstock 圖表中將分鐘設(shè)置為單位

UYOU 2021-11-12 16:48:12
我正在嘗試獲取一張高價(jià)圖表以在 x 軸上顯示分鐘數(shù)。我在 csv 數(shù)據(jù)中的第一列是分鐘。我想我的 rangeSelector 選項(xiàng)是正確的,但我不知道如何使 x 軸成為我的 csv 的分鐘數(shù)。我看到的大多數(shù)解決方案都用 Date.UTC(xx, xx, xx, xx) 或類似的東西填充 x 軸。但我需要用分鐘來(lái)填滿它。這是我到目前為止所擁有的:<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"><html><head>    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">    <title>Highcharts Data from innerHTML of hidden div</title>    <style>        body {            margin-top: 30px;            margin-left: 40px;        }        pre {            border: 1px solid red;        }    </style>    <!-- Highcharts related imports -->    <!-- <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>    <script src="http://code.highcharts.com/highcharts.js"></script>    <script src="http://code.highcharts.com/modules/data.js"></script>    <script src="http://code.highcharts.com/modules/exporting.js"></script> -->    <!-- Highstock related imports  -->    <script src="https://code.highcharts.com/stock/highstock.js"></script>    <script src="https://code.highcharts.com/stock/modules/data.js"></script>    <script src="https://code.highcharts.com/stock/modules/exporting.js"></script>    <script src="https://code.highcharts.com/stock/modules/export-data.js"></script></head><body>    <div style="width: 800px; margin: 2em auto; padding: 1em; border: 1px solid red; border-radius: 0.5em">        Highcharts data load from a csv stored inline in a hidden div
查看完整描述

1 回答

?
翻過(guò)高山走不出你

TA貢獻(xiàn)1875條經(jīng)驗(yàn) 獲得超3個(gè)贊

請(qǐng)注意,在日期時(shí)間軸的 Highharts 中,X 值是自 1970 年以來(lái)以毫秒為單位的時(shí)間戳。因此您的值不是分鐘而是毫秒。


要實(shí)現(xiàn)您想要的目標(biāo),您必須映射 CSV 數(shù)據(jù)以制作分鐘時(shí)間戳并更改 xAxis 標(biāo)簽和工具提示內(nèi)容呈現(xiàn)點(diǎn)日期的方式。檢查下面發(fā)布的演示和代碼。


代碼:


  xAxis: {

    title: {

      enabled: true,

      text: 'Minutes'

    },

    type: 'datetime',

    dateTimeLabelFormats: {

      minute: '%M',

      hour: '%H:%M',

      day: '%H:%M',

      week: '%e. %b',

      month: '%b \'%y',

      year: '%Y'

    }

  },

  tooltip: {

    formatter: function () {

        const points = this.points;


        return [

        Highcharts.dateFormat('%H:%M', this.x),

        'Series1: ' + points[0].y,

        'Series2: ' + points[1].y

      ];

    },

    split: true

  }


查看完整回答
反對(duì) 回復(fù) 2021-11-12
  • 1 回答
  • 0 關(guān)注
  • 156 瀏覽
慕課專欄
更多

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購(gòu)課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)