Hi,
I have built my first notebook and I have an Input.table
in which I would like to change some field label (in example change Costo complessivo
in Costo complessivo (β¬)
.
Is it possible to do it? If yes, how to do it?
Thank you
Hi,
I have built my first notebook and I have an Input.table
in which I would like to change some field label (in example change Costo complessivo
in Costo complessivo (β¬)
.
Is it possible to do it? If yes, how to do it?
Thank you
It seems there should be a more efficient approach, but one way to accomplish this is to simply rename the column when you load the data. That might look something like so:
data = {
let data = await d3.json(
"https://raw.githubusercontent.com/ondata/datiBeneComuneMonitoraggio/main/catalogo/PNRRcontributiComuniRigenerazioneUrbana/output/decreto-fl-30-12-2021-all-3.json"
);
data.forEach(o => o['Costo complessivo (β¬)'] = o['Costo complessivo'])
return data
}
I sent you a suggestion that yields the following:
You can specify column names with the header option.
I am on my phone so tricky to type an example but let me know if you figure it out!
Btw, you can read about the Inputs options in the API docs GitHub - observablehq/inputs: Better input elements
Thank you, itβs what I needed
header: {
"Costo complessivo": "Costo complessivo (β¬)"
}
And thank you also to @mcmcclur