Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

228
Views
Google Chart, X-Axis and Line won't render in Safari, but works in Chrome

See this codepen:

https://codepen.io/rblythe/pen/OJOVeXa

In chrome it renders just fine like this:

(Although it does have that weird artifact where it shows a blue line outside of the chart on the right side...not sure if that has anything to do with why it won't work in Safari)

In Chrome

However, in safari it won't render the line and the x-axis doesn't render either. It seems like it doesn't accept the data points.

In Safari

Any ideas?

    google.load('visualization', '1', {packages: ['corechart']});
google.setOnLoadCallback(drawVisualization0);

function drawVisualization0() {
    var data = new google.visualization.DataTable();
    data.addColumn('date', 'x');
    data.addColumn({type: 'string', role: 'annotation'});
    data.addColumn('number', 'Rating');
    data.addRow([new Date('2022-01-28 11:42:50'), null, 2]);
    data.addRow([new Date('2022-01-28 14:42:34'), null, 4]);

    var formatter = new google.visualization.DateFormat({pattern: 'yyyy-mm-dd'});
    formatter.format(data, 0);
    new google.visualization.LineChart(document.getElementById('chart0')).
    draw(data, {
        title: '',
        curveType: 'function',
        vAxis: {
            viewWindow: {min: 1, max: 6},
            textStyle:{color: '#FFFFFF'},
            gridlines: {color:"#404758"}
        },
        hAxis: {
            textStyle:{color: '#FFFFFF'},
            gridlines: {color:"#404758"}
        },
        colors: ['#ADC6FF'],
        backgroundColor: '#272930',
        gridlines: {
            color: "#404758"
        },
        baselineColor: '#404758',
        annotations: {
            style: 'line',
            color: "#FFFFFF",
            gridlines: {color:"#404758"},
            textStyle:{color: '#C4C6D0'}
        },
        chartArea: {
          // leave room for y-axis labels
          width: '94%'
        }
    });
}
google.load('visualization', '1', {packages: ['corechart']});
google.setOnLoadCallback(drawVisualization1);
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!