0

I have a bunch of HighCharts running data from Google Sheets, and some of them firstly render the plot area then keep reloading the data on the chart, and I can't figure out why. Is this just a HighCharts thing, or something I can fix?

This is what's happening https://youtu.be/ddM-WxCAczM

This is the Google Sheet I'm loading into HighCharts cloud https://docs.google.com/spreadsheets/d/e/2PACX-1vSQEXUaZFqT3Oatl3AK8S-bqq6vNs5vDjoG2puaFvQ7LsSGB5dIaBk0Kp2aHWE2lbFEms9gZ6r36TTQ/pubhtml

Here's the custom code I'm applying in HighCharts cloud to render the chart how I need it:

Highcharts.merge(true, options, {
  chart: {
    height: 445,
    marginTop: 70,
    spacingBottom:-100,
    style: {
      fontFamily: '"Trebuchet MS","Trebuchet","Helvetica","Lucida Sans Unicode","Lucida Sans",Tahoma,sans-serif',
    },
    events: {
      load: function () {
        this.update({
          exporting: {
            filename: this.options.title.text,
          }
        });
      }
    },
    plotBorderColorLeft: '#ccc',
    plotBorderWidth: 0,
    backgroundColor: {
      stops: [
        [1, 'rgb(255, 255, 255)'],
      ]
    }
  },
  plotOptions: {
    column: {
           pointPlacement: 'between'
        },
    series: {
      marker: {
      enabled: false,
      },
      cursor: 'arrow'
    }
  },
  yAxis: {
    plotLines: [{
      color: '#010101',
      width: 2,
      value: 0,
      zIndex: 5
    }],
    lineWidth: 1.5,
    gridLineWidth: 0,
    lineColor: '#010101',
    tickWidth: 1.5,
    tickLength: 4,
    tickColor: '#010101',
    title: {
      align: 'high',
      offset: -10,
      text: '(%)',
      rotation: 0,
      y: -12,
      style: {
        fontSize: '14px'
      },
    },
    labels: {
      enabled: true,
      style: {
        fontSize: '13px'
      }
    },
    startOnTick: true,
    endOnTick: true,
    tickInterval: 1,
    tickPosition: 'inside',
    tickmarkPlacement: 'on',
  },
  xAxis: {
    title: {
      text: 'Date',
      style: {
        display: 'none'
      }
    },
    offset:-127,
    useHTML: true,
    labels: {
      enabled: true,
      rotation: -90,
      x: 14,
      style: {
        fontSize: '16px'
      },
    y:160
    },
    lineWidth:2,
    lineColor: '#010101',
    tickWidth:2,
    tickPosition: 'inside',
    tickLength:4,
    tickColor: '#010101',
    tickmarkPlacement: 'on',
    startOnTick: false,
    endOnTick: false,
    min:.0,
    max:40.4
  },
  credits: {
    enabled:false
  },
  legend: {
    symbolRadius: 0,
    floating:true,
    itemStyle: {
      font: '14px Trebuchet MS, Trebuchet, "Helvetica", Verdana, sans-serif',
      color: '#010101'
    },
    itemMarginTop: 5,
    floating: true,
    layout: 'vertical',
    align: 'left',
    verticalAlign: 'top',
    enabled: true,
    x: 50,
    y: 15
  },
  subtitle: {
    style: {
      display: 'none'
    },
    y: 0
  },
  title: {
    style: {
      display: 'none'
    },
    y: 0
  },
  tooltip: {
    valueSuffix: '%'
  },
  exporting: {
    buttons: {
      contextButton: {
      enabled: true,
      y:-10,
      x:10,
      text: 'Download',
      menuItems: [
        "printChart",
        "separator",
        "downloadPNG",
        "downloadJPEG",
        "downloadPDF",
        "downloadSVG",
        "separator",
        "downloadCSV",
        "downloadXLS",
          {
            textKey: 'viewData',
            text: 'Toggle data table',
            onclick: function() {
              if (this.dataTableDiv && this.dataTableDiv.style.display !== 'none') {
                this.dataTableDiv.style.display = 'none';
              } else {
                this.viewData();
                this.dataTableDiv.style.display = '';
              }
            }
          }
        ]
      }
    }
  }
});
Jon Wunder
  • 39
  • 3
  • [Welcome to StackOverflow](http://StackOverflow.com/tour) - Please include a [mcve] to your question. Otherwise it may be impossible to tell *exactly* where the issue lies. – blurfus May 09 '19 at 00:06
  • Sure thing - here you go https://codepen.io/jonboy/full/oRbNqe – Jon Wunder May 09 '19 at 05:22
  • The idea is for the code to be included in your question to make it self-suficient. If the given link goes away, the question becomes incomplete and, thus, no one will be able to fully see it in the future. – blurfus May 09 '19 at 05:36
  • Righto - I misunderstood. I've updated the question. – Jon Wunder May 09 '19 at 06:55
  • Thanks for updating the question but it is still not an [mcve] - at this point, it might be a good idea to also read our [ask] page for hints. A good question tends to receive faster, better answers from the community – blurfus May 09 '19 at 17:01
  • Please make your google sheets public, so that we can examine if they're in correct format. – Kamil Kulig May 10 '19 at 09:26
  • Ok - found out if I turn off the animation for the data series, it doesn't do the "reloading" thing. – Jon Wunder May 16 '19 at 06:01

0 Answers0