如何使用angular8在顶点图表上显示准确的时间戳?

问题描述

时间戳数据(开始时间和结束时间)与顶点图表时间序列不匹配。

我试图使用尖角在顶点图表上显示时间戳的确切时间间隔,但是我没有收到

enter image description here

中显示的预期结果。

这是我的顶点图表配置:

  series: chartSeriesData,chart: {
            height: 200,width: '100%',type: 'bar',events: {
                dataPointSelection: (event,chartContext,config) => {
                        const xaxis = {min : config.w.config.series[config.seriesIndex].data[config.dataPointIndex][0],max: ''};
                        this.selectedRowsEvent(xaxis,'click');
                },zoomed: (chartContext,{ xaxis,yaxis }) => {
                    this.selectedRowsEvent(xaxis,null);
                },scrolled: function(chartContext,{ xaxis }) {
                }
            },// zoom: {
            //     enabled: true,//     type: 'x',//     autoScaleYaxis: false
            // },},dataLabels: {
            enabled: false
        },legend : {
            itemMargin: {
                horizontal: 10,vertical: 20
            }
        },xaxis: {
            type: 'datetime',min : this.sortedChartData[0].timestamp,max : this.sortedChartData[this.sortedChartData.length - 1].timestamp,axisTicks: {
                show: true,borderType: 'solid',color: '#78909C',height: 6,offsetX: 0,offsetY: 0
            }
        },yaxis: {
            show : false,labels: {
                formatter: function (value,opts) {
                    return '';
                },tooltip : {
            // shared: true,y: {
                formatter : undefined,title: {
                    formatter: (seriesName) =>  seriesName,colors: [ '#78ad68','#EF6301','#EB2300','#56b4d1','#fad652']
    };
    
}

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)