How to specify CSV column names for charts #6380
Replies: 2 comments 4 replies
-
Is this CSV time-series? If so the chart should automatically be shown for the selected feature. For example http://ci.terria.io/main/#share=s-iC6I6sm2MzhLNsJYm4X0vbrjnWk Which is using http://ci.terria.io/main/build/TerriaJS/test/csv/lat_lon_enum_date_id.csv There is info about As for setting There is also info about chart attributes here terriajs/lib/ReactViews/Custom/ChartCustomComponent.ts Lines 29 to 92 in fc33525 Attribute names are in kebab-case - eg If you are able to provide a subset of your dataset I can have a closer look Cheers, |
Beta Was this translation helpful? Give feedback.
-
Thank you so much for the response @nf-s. I was also exploring the National Map's "Wind" dataset linked here. Basically I'm trying to build a real-time and dynamic charting behavior using a PostgreSQL API (PostgREST) that is linked to a catalogue file. I've already had a look at a similar question posted here as the basis of my work. The file, based on point selection:
The sources parameter requests the table to chart but its response type is JSON
TerriaMap doesn't seem to be accepting this response type. Is there any way to accept a CSV via the |
Beta Was this translation helpful? Give feedback.
-
Hey!
So I've been tinkering around with v8 a bit where I'm trying to display a CSV file as charts based on each coordinate clicked. I have the coordinates displayed but I'm not able to figure out how to specify the column names from the CSV that has to be charted. Sharing the code below:
{ "catalog": [ { "name": "NAES", "type": "csv", "url": "build/TerriaJS/test/csv/naesall.csv", "featureInfoTemplate" : { "name": "{{site}} | Viral Load:{{viral_load}}", "template": "<chart src='build/TerriaJS/test/csv/naesall.csv' column-names='Time,Viral Load' column-units='Date,VL'></chart>" } } ] }
I've tried using
x-column={{date}} x-column={{viral_load}}
andx-column='date' x-column= 'viral_load'
. In both instances I get aNo chartable data found
error. Any help would be highly appreciated.Thanks!
Beta Was this translation helpful? Give feedback.
All reactions