How to use the highcharts.dateFormat function in highcharts

To help you get started, we’ve selected a few highcharts examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github gravitee-io / gravitee-management-webui / src / components / chart / chart.directive.ts View on Github external
formatter: function () {
                  //TODO: check this
                  //let s = '<b>' + Highcharts.dateFormat('%A, %b %d, %H:%M', new Date(this.x)) + '</b>';
                  let dateFormat = newOptions.dateFormat || '%A, %b %d, %H:%M';
                  let s = '<b>' + Highcharts.dateFormat(dateFormat, this.x) + '</b>';
                  if (_.filter(this.points, (point: any) =&gt; {
                      return point.y !== 0;
                    }).length) {
                    _.forEach(this.points, function (point) {
                      if (point.y) {
                        let name = ' ' + (point.series.options.labelPrefix ? point.series.options.labelPrefix + ' ' + point.series.name : point.series.name);
                        s += '<br><span style="color:' + point.color + '">\u25CF</span>' + name + ': <b>' + (point.series.options.decimalFormat?Highcharts.numberFormat(point.y, 2):point.y) +
                          (point.series.options.labelSuffix?point.series.options.labelSuffix:'') + '</b>';
                      }
                    });
                  }
                  return s;
                },
                headerFormat: '<b>{point.key}</b><br>',
github zencrepes / zencrepes / imports / ui / components / Cards / VelocityDays / CombinationChart.js View on Github external
formatter: function () {
                    return Highcharts.dateFormat('%B %e, %Y', this.x) + '<br>' +
                        this.series.name + ':' + Highcharts.numberFormat(this.y);
                },
            },
github studentinsights / studentinsights / app / assets / javascripts / student_profile / profile_chart_settings.jsx View on Github external
formatter: function () {
      const date = Highcharts.dateFormat('%A, %b %e, %Y', new Date(this.x));
      const percentileRank = this.y;
      const gradeLevelEquivalent = this.points[0].point.gradeLevelEquivalent;

      if ( gradeLevelEquivalent === undefined ) {
        return date + '<br>Percentile Rank:<b> ' + percentileRank;
      } else {
        return date + '<br>Percentile Rank:<b> ' + percentileRank +
               '</b><br>Grade Level Equivalent: <b>' + gradeLevelEquivalent;
      }
    },
    shared: true</b></b>
github ice-lab / react-materials / blocks / RealTimeData / src / SplineChart.jsx View on Github external
formatter() {
      const self = this;
      return (
        `<b>${ 
        self.series.name 
        }</b><br>${ 
        Highcharts.dateFormat('%Y-%m-%d %H:%M:%S', self.x) 
        }<br>${ 
        Highcharts.numberFormat(self.y, 2)}`
      );
    },
  },
github QQhuxuhui / kafkaMonitor / kafkaMonitor-ui / src / components / pages / kafka / monitor / KafkaOffsetMonitor.vue View on Github external
formatter: function () {
            return '<b>' + this.series.name + '</b><br>' +
              '<b>' + 'topic:' + that.char_topic + '</b><br>' +
              '<b>' + 'group:' + that.char_groupId + '</b><br>' +
              Highcharts.numberFormat(this.y, 0) + '<br>' +
              Highcharts.dateFormat('%Y-%m-%d %H:%M:%S', this.x) + '<br>';
          }
        },
github zencrepes / zencrepes / imports / ui / components / Charts / Highcharts / BurndownChart.js View on Github external
formatter: function () {
                    return Highcharts.dateFormat('%B %e, %Y', this.x) + '<br>' +
                        this.series.name + ':' + Highcharts.numberFormat(this.y);
                },
            },
github govau / datavizkit / src / utils / displayFormats.js View on Github external
  dayMonthYear: val => Highcharts.dateFormat('%e %b %Y', new Date(val)),
  monthYear: val => Highcharts.dateFormat('%b %Y', new Date(val)),
github alibaba / ice / react-materials / scaffolds / ice-build-platfrom / src / pages / Dashboard / components / SplineChart / SplineChart.jsx View on Github external
formatter: function() {
      return (
        '<b>' +
        this.series.name +
        '</b><br>' +
        Highcharts.dateFormat('%Y-%m-%d %H:%M:%S', this.x) +
        '<br>' +
        Highcharts.numberFormat(this.y, 2)
      );
    },
  },
github intuit / foremast / foremast-browser / src / components / charts / scatter / ScatterChart.js View on Github external
formatter: function() {
          return  (Highcharts.dateFormat('%e%b%Y %H:%M:%S', new Date(this.x)) +
            '<br>Error Count: ' + this.y.toFixed(0) +
            '<br>Latency:' + this.point.z.toFixed(2) + ' ms');
        }
      },