zoukankan      html  css  js  c++  java
  • highCharts 常见用法整理

    highCharts用法

    tooltip

    tooltip: {
      valueDecimals: 0,  // 保留几位小数
      shared: true,  // 提示框被共享,有序数据的系列类型将被显示在同一个提示框中
      crosshairs: true,
      // 时间格式化字符
      // 默认会根据当前的数据点间隔取对应的值
      // 图表中数据点间隔为 1天,配置 day 值即可
      dateTimeLabelFormats: {
        millisecond: '%H:%M:%S.%L',
        second: '%H:%M:%S',
        minute: '%Y-%m-%d %H:%M',
        hour: '%Y-%m-%d %H:%M',
        day: '%Y-%m-%d',
        week: '%m-%d',
        month: '%Y-%m',
        year: '%Y'
      }
    },
    

    xAxis

    xAxis: {
      type: 'datetime',
      tickInterval: 1000 * 60 * 60 * 24 * 365,
      // milliseconds * seconds * minutes * hours * days = 1 year
      crosshair: true,  //十字准星线
      dateTimeLabelFormats: {
        day: '%m-%d',
        hour: '%H:%M',
        minute: '%H:%M',
        month: '%Y-%m',
      },
      // labels: {
      //   formatter: (x)=>{
      //     return x.value
      //   }
      // }
    },
    

    yAxis

    yAxis: {
      title: {
        text: '数量',
      },
      crosshair: true,  //十字准星线
    },
    

    本文来自博客园,作者:叶子玉,转载请注明原文链接:https://www.cnblogs.com/knuzy/p/15734495.html

  • 相关阅读:
    新的知识点
    知识点
    9.14知识点
    列表内容
    css的背景和边框
    css的text和font
    css
    js 第一天
    浏览器的差距
    布局
  • 原文地址:https://www.cnblogs.com/knuzy/p/15734495.html
Copyright © 2011-2022 走看看