Love the word cloud feature! A couple of quick questions re: the API:
- Is there a way to get words to show up together? Eg: for the input “Management Consultant, Engineer, Actuary, Business Development Officer”, “Management Consultant” and “Business Development Officer” would show up next to each other in the same colour, rather than in different parts of the wordcloud
- Is there a way to preserve the capitalisation of words - eg: Management rather than management?
- I’m struggling to change the colour and font - any advice gratefully appreciated, here’s the code:
function generateWordCloudImageUrl(careerList) {
var wordArray = careerList.split(‘,’).map(function(s) { return s.trim(); });
const payload = {
“format”: “png”,
“width”: 600,
“height”: 400,
“fontFamily”: “Raleway, sans-serif”,
“color”: “#FB6302”,
“fontScale”: 15,
“scale”: “linear”,
“text”: wordArray.join(‘\n’)
};
const options = {
‘method’: ‘post’,
‘payload’: JSON.stringify(payload),
‘headers’: {
‘Content-Type’: ‘application/json’
}
};
const response = UrlFetchApp.fetch(‘https://quickchart.io/wordcloud’, options);
const blob = response.getBlob().setName(‘wordcloud.png’);
const path = ‘/Oxford Scholastica Academy/Marketing/The Great Careers Report/Wordclouds/wordcloud.png’;
uploadToDropbox(blob, DROPBOX_ACCESS_TOKEN, path);
// Delete existing shared link if exists
deleteExistingSharedLink(path, DROPBOX_ACCESS_TOKEN);
// Create a new shared link
const imageUrl = createDropboxSharedLink(path, DROPBOX_ACCESS_TOKEN);
return imageUrl;
}
Many thanks!
Jamie