How to use the highcharts.charts 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 intuit / foremast / foremast-browser / src / App.js View on Github external
.addEventListener(eventType, function (e) {
          var chart, point, i, event;

          for (i = 0; i < Highcharts.charts.length; i = i + 1) {
            chart = Highcharts.charts[i];
            if (chart) {
              // Find coordinates within the chart
              event = chart.pointer.normalize(e);
              // Get the hovered point
              point = chart.series[0].searchPoint(event, true);
              if (point) {
                point.highlight(e);
              }
            }
          }
        });
    });
github intuit / foremast / foremast-browser / src / App.js View on Github external
.addEventListener(eventType, function (e) {
          var chart, point, i, event;

          for (i = 0; i < Highcharts.charts.length; i = i + 1) {
            chart = Highcharts.charts[i];
            if (chart) {
              // Find coordinates within the chart
              event = chart.pointer.normalize(e);
              // Get the hovered point
              point = chart.series[0].searchPoint(event, true);
              if (point) {
                point.highlight(e);
              }
            }
          }
        });
    });
github intuit / foremast / foremast-browser / src / components / charts / timeseries / TimeseriesChart.js View on Github external
H.syncExtremes = function(e) {
    var thisChart = this.chart;

    if (e.trigger !== "syncExtremes") {
      // Prevent feedback loop
      Highcharts.each(Highcharts.charts, function(chart) {
        if (chart && chart !== thisChart) {
          if (chart.xAxis[0].setExtremes) {
            // It is null while updating
            chart.xAxis[0].setExtremes(e.min, e.max, undefined, false, {
              trigger: "syncExtremes"
            });
          }
        }
      });
    }
  };
})(Highcharts);
github Robinyo / serendipity / projects / dashboard-widgets / src / lib / highcharts-angular / services / highcharts.service.ts View on Github external
public reflowWidgets() {

    Highcharts.charts.forEach(chart => {

      // ERROR TypeError: Cannot read property 'reflow' of undefined
      if (chart) {
        chart.reflow();
      }

    });

  }
github tlambert03 / FPbase / static / src / fpbase-spectra / Components / SpectraViewer / SpectraViewer.jsx View on Github external
export const BaseSpectraViewer = memo(function BaseSpectraViewer({
  data,
  tooltip,
  yAxis,
  xAxis,
  exNorm,
  chartOptions,
  ownerInfo,
  hidden,
}) {
  const windowWidth = useWindowWidth()
  let height = calcHeight(windowWidth) * (chartOptions.height || 1)

  const hChart = Highcharts.charts[0]
  let legendHeight
  if (hChart) {
    legendHeight = Highcharts.charts[0].legend.legendHeight || 0
    height += legendHeight
  }

  const owners = [...new Set(data.map(item => item.owner.slug))]
  const numSpectra = data.length
  const exData = data.filter(i => i.subtype === "EX" || i.subtype === "AB")
  const nonExData = data.filter(i => i.subtype !== "EX" && i.subtype !== "AB")
  return (
    <div height="" style="{{">
      </div>
github intuit / foremast / foremast-browser / src / components / charts / scatter / ScatterChart.js View on Github external
unbind();
              }
          });
          handlers.length = 0;
      }

      handlers.push(Highcharts.addEvent(document, 'mousemove', drag));
      handlers.push(Highcharts.addEvent(document, 'touchmove', drag));
      handlers.push(Highcharts.addEvent(document, 'mouseup', unbindAll));
      handlers.push(Highcharts.addEvent(document, 'touchend', unbindAll));
    };

  }

  for (let i = 0; i &lt; Highcharts.charts.length; i = i + 1) {
    chart = Highcharts.charts[i];
    if(chart.options.chart.type === 'scatter3d'){
      Highcharts.addEvent(chart.container, 'mousedown', dragStart(chart));
      Highcharts.addEvent(chart.container, 'touchstart', dragStart(chart));

    }
  }
}, 1000); //1000 ms is totally arbitrary and really a hack to make sure the event binders occur after charts are loaded
github gravitee-io / gravitee-management-webui / src / components / chart / chart.directive.ts View on Github external
element.bind('mousemove touchmove touchstart', function (e) {
            let chart, i, event, points;

            for (i = 0; i &lt; Highcharts.charts.length; i++) {
              chart = Highcharts.charts[i];
              if (chart &amp;&amp; chart.pointer) {
                if (e.originalEvent) {
                  event = chart.pointer.normalize(e.originalEvent);
                } else {
                  event = chart.pointer.normalize(e);
                }
                points = _.map(chart.series, (serie: any) =&gt; {
                  return serie.searchPoint(event, true);
                });
                points = _.filter(points, function (point) {
                  return point;
                });

                (e as any).points = points;
                if (points.length &amp;&amp; points[0] &amp;&amp; points[0].series.area) {
github gravitee-io / gravitee-management-webui / src / components / chart / chart.directive.ts View on Github external
element.bind('mousemove touchmove touchstart', function (e) {
            let chart, i, event, points;

            for (i = 0; i &lt; Highcharts.charts.length; i++) {
              chart = Highcharts.charts[i];
              if (chart &amp;&amp; chart.pointer) {
                if (e.originalEvent) {
                  event = chart.pointer.normalize(e.originalEvent);
                } else {
                  event = chart.pointer.normalize(e);
                }
                points = _.map(chart.series, (serie: any) =&gt; {
                  return serie.searchPoint(event, true);
                });
                points = _.filter(points, function (point) {
                  return point;
                });

                (e as any).points = points;
                if (points.length &amp;&amp; points[0] &amp;&amp; points[0].series.area) {
                  points[0].highlight(e);
github intuit / foremast / foremast-browser / src / components / charts / scatter / ScatterChart.js View on Github external
if (unbind) {
                  unbind();
              }
          });
          handlers.length = 0;
      }

      handlers.push(Highcharts.addEvent(document, 'mousemove', drag));
      handlers.push(Highcharts.addEvent(document, 'touchmove', drag));
      handlers.push(Highcharts.addEvent(document, 'mouseup', unbindAll));
      handlers.push(Highcharts.addEvent(document, 'touchend', unbindAll));
    };

  }

  for (let i = 0; i &lt; Highcharts.charts.length; i = i + 1) {
    chart = Highcharts.charts[i];
    if(chart.options.chart.type === 'scatter3d'){
      Highcharts.addEvent(chart.container, 'mousedown', dragStart(chart));
      Highcharts.addEvent(chart.container, 'touchstart', dragStart(chart));

    }
  }
}, 1000); //1000 ms is totally arbitrary and really a hack to make sure the event binders occur after charts are loaded
github tlambert03 / FPbase / static / src / fpbase-spectra / Components / SpectraViewer / SpectraViewer.jsx View on Github external
data,
  tooltip,
  yAxis,
  xAxis,
  exNorm,
  chartOptions,
  ownerInfo,
  hidden,
}) {
  const windowWidth = useWindowWidth()
  let height = calcHeight(windowWidth) * (chartOptions.height || 1)

  const hChart = Highcharts.charts[0]
  let legendHeight
  if (hChart) {
    legendHeight = Highcharts.charts[0].legend.legendHeight || 0
    height += legendHeight
  }

  const owners = [...new Set(data.map(item =&gt; item.owner.slug))]
  const numSpectra = data.length
  const exData = data.filter(i =&gt; i.subtype === "EX" || i.subtype === "AB")
  const nonExData = data.filter(i =&gt; i.subtype !== "EX" &amp;&amp; i.subtype !== "AB")
  return (
    <div height="" style="{{">
      </div>