I'm using the d3 library trying to do a geo chart with LWC. To do so I need a csv file with my values in it like the example bellow
var promises = ; promises.push(d3.json('d3js/map-population/regions.json')); promises.push(d3.csv("d3js/map-population/population.csv"));
My JSON is already a static ressource in my org but for the CSV it will be the result of a SOQL query with my values. Something like that :
List<Account> listAcc = [SELECT City, CityCode__c, Value1__c, Value2__c FROM Account]
I tried creating a list of String adding the value of my list of Account but the result isn't what I was expected. The CSV file should looks like this :
CODE_REG, Name_REG, CODE_State, Name_State, Value1, Value2 my values seperated by coma
How can I do the trick without exporting a CSV file each time I want to retrieve my data through my lwc component implementing d3 library ?