Marqs
Posts: 10
Joined: Wed Aug 29, 2018 9:58 am

dataRefreshRate doesn't work :(

Hi, when I run the file below using the dataRefreshRate it doesn't work (white screen). As soon as I delete that command it works perfectly (but without the refreshing rate needed).
Many thanks in advance!
Marqs

<html>
<head> provant CSV real time
</head>

<body>

<script src="https://code.highcharts.com/highcharts.js"></script>
<script src="https://code.highcharts.com/modules/data.js"></script>
<script src="https://code.highcharts.com/modules/exp ... "></script>

<div id="container" style="min-width: 310px; height: 400px; margin: 0 auto"></div>

<script type="text/javascript">

Highcharts.chart('container', {
chart: {
type: 'spline'
},
title: {
text: 'Live Data (CSV)'
},

subtitle: {
text: 'Data input from a remote CSV file'
},

data: {
csvURL: 'https://www.cram-iot.cat/test.csv',
enablePolling: true
dataRefreshRate: 1
}
});

</script>

</body>

</html>
rafalS
Posts: 2665
Joined: Thu Jun 14, 2018 11:40 am

Re: dataRefreshRate doesn't work :(

Hi, Marqs!

I think you are missing a comma after true ;) try with this:

Code: Select all

data: {
csvURL: 'https://www.cram-iot.cat/test.csv',
enablePolling: true,
dataRefreshRate: 1
}
Best regards!
Rafał
Rafal Sebestjanski,
Highcharts Team Lead
Marqs
Posts: 10
Joined: Wed Aug 29, 2018 9:58 am

Re: dataRefreshRate doesn't work :(

Many thanks Rafal. I've added the coma but it doesn't refresh the graph values. Maybe it is due to the way I'm uploading the csv? (via ftp). I've tried to change manually the values of the CSV directly from the ftp file and it doesn't work neither.

SOS... thanks!

Marc
rafalS
Posts: 2665
Joined: Thu Jun 14, 2018 11:40 am

Re: dataRefreshRate doesn't work :(

Marc,

Have you got familiar with this guide? https://www.highcharts.com/docs/working ... /live-data
I am not sure but it might not be enough to update your file via ftp. Have you tried to configure your server like in the guide above?

There is not a problem with your code for sure, because everything works fine for me when I change the link to data
from

Code: Select all

csvURL: 'https://www.cram-iot.cat/test.csv',
to

Code: Select all

csvURL: 'https://demo-live-data.highcharts.com/time-data.csv',
So definitively it's all about the server settings.

Rafał
Rafal Sebestjanski,
Highcharts Team Lead
Marqs
Posts: 10
Joined: Wed Aug 29, 2018 9:58 am

Re: dataRefreshRate doesn't work :(

Thanks Rafal, I already take a look on it but it is too complicated for me. I just want to plot a graph from a csv file, to be updated every time the csv is updated (min. 1 sec. refresh).

Can you (or one of your colleagues) offer such development service? I'll pay for it.

Many thanks in advance.
rafalS
Posts: 2665
Joined: Thu Jun 14, 2018 11:40 am

Re: dataRefreshRate doesn't work :(

Marqs,

Please, contact Black Label company:
www.blacklabel.pl
[email protected]

Kind regards,
Rafał
Rafal Sebestjanski,
Highcharts Team Lead
Marqs
Posts: 10
Joined: Wed Aug 29, 2018 9:58 am

Re: dataRefreshRate doesn't work :(

Thabks Rafal, I've just contacted them.

Return to “Highcharts Usage”