How to use the highcharts/highstock.src.StockChart 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 regentmarkets-repo-archive / binary-charts-archived / src / ChartCore.js View on Github external
createChart(newProps?: Props) {
        const props = newProps || this.props;
        const config = initChart(Object.assign({
            hideEndButton: (hide) =>
                this.props.parent.setState({ endButtonShown: !hide }),
        }, props));

        this.chart = this.props.parent.chart =
            new Highcharts.StockChart(this.chartDiv, config, (chart) => {
            if (!props.noData && props.ticks.length === 0) {
                chart.showLoading();
            }
        });

        this.eventListeners = props.events.map(e => ({
            type: e.type,
            handler: ev => e.handler(ev, this.chart),
        }));

        this.eventListeners.forEach(e => this.chartDiv.addEventListener(e.type, e.handler));
    }
github peerplays-network / peerplays-core-gui / src / components / Exchange / ExchangePriceChart.jsx View on Github external
let currTime = new Date().getTime();
      let minVal = nextProps.priceChartCurrentPeriod
        ? currTime - 1000 * nextProps.priceChartCurrentPeriod
        : min;

      if (nextProps.priceChartCurrentPeriod) {
        this.chart.xAxis[0].setExtremes(minVal, currTime);
        this.chart.xAxis[0].update({
          min: minVal,
          max: currTime,
          range: currTime - minVal
        });
        this.chart.xAxis[0].setExtremes();
      } else {
        this.chart = new Highstock.StockChart('chart01', {
          global: {
            useUTC: false
          },
          colors: [
            {
              linearGradient: {
                x1: 1,
                y1: 0,
                x2: 0,
                y2: 1
              },
              stops: [
                [
                  0, '#2f97e9'
                ],
                [1, '#00fe95']
github regentmarkets-repo-archive / binary-charts-archived / src / PlainChart.js View on Github external
const createChart = (renderTo, params) => {
    const config = initChart(params);
    const chart = new Highcharts.StockChart(renderTo, config);
    if (params.type === 'candlestick') {
        chart.xAxis[0].update({
            minRange: 10 * 60 * 1000,
        });
    }

    return chart;
};
github peerplays-network / peerplays-core-gui / web / app / components / Exchange / ExchangePriceChart.jsx View on Github external
let currTime = new Date().getTime();
      let minVal = nextProps.priceChartCurrentPeriod
        ? currTime - 1000 * nextProps.priceChartCurrentPeriod
        : min;

      if (nextProps.priceChartCurrentPeriod) {
        this.chart.xAxis[0].setExtremes(minVal, currTime);
        this.chart.xAxis[0].update({
          min: minVal,
          max: currTime,
          range: currTime - minVal
        });
        this.chart.xAxis[0].setExtremes();
      } else {
        this.chart = new Highstock.StockChart('chart01', {
          global: {
            useUTC: false
          },
          colors: [
            {
              linearGradient: {
                x1: 1,
                y1: 0,
                x2: 0,
                y2: 1
              },
              stops: [
                [
                  0, '#2f97e9'
                ],
                [1, '#00fe95']