amcharts / dataloader

Apache License 2.0
25 stars 25 forks source link

Problem when loading remote data with stock charts #5

Open markedmondson opened 9 years ago

markedmondson commented 9 years ago

With data with a date format "YYYY-MM-DD" and no dateFormat set within periodSelector, I'm getting this error, although the graph renders as expected: Uncaught TypeError: Cannot read property 'setDefaultPeriod' of undefined

Fiddle: http://jsfiddle.net/6g6tcbb1/1/

When the dateFormat is set, the graph size is shrunk and no longer visible: http://jsfiddle.net/6g6tcbb1/2/

I'm guessing the periodSelector isn't waiting until the data has been fully loaded but it's hard to dig through the minified amcharts files.

martynasma commented 9 years ago

Thanks for bringing it to our attention. Grab the latest commit from the repo for a fixed version.

markedmondson commented 9 years ago

Thanks for the prompt fix but I think it still exists with the latest version: http://jsfiddle.net/6g6tcbb1/2/ when the dateFormat is set unless I'm missing something?

martynasma commented 9 years ago

Hi Mark,

I can't seem to be able to reproduce it. However, I can see there's another issue with the chart you are using as a test. If the periodSelector does not have any pre-defined periods, the panel is hidden. This is a bug in JavaScript Stock Chart and is not related to Data Loader. We'll fix it.

In the interim, if you set some pre-defined periods in your chart, you should be good to go.