Closed jikaczmarski closed 2 months ago
I've searched around and here's what I know so far. It is simple enough to change the labels inside of a tooltip through the use of a channels:
plot option call,
Plot.plot({
marks: [
Plot.barY(
x: "x",
y: "y",
fill: "fuel_type",
channels: {'Percentage Point Change':"x", Region:"y", 'Fuel Type':"fuel_type"},
tip: true
)
]
})
However, this does not work for fills since they seem to be handled differently. In my searches, I have not seen and tips on this - most ignore the styling of the fill label entirely. I have made a forum post and hope to hear back soon (I have had lots of success with community support in the past).
No solution was immediately apparent. Thanks to MP_Li, the work around being used now is to modify the imported data by changing the label on the fill at the header level. For example,
original_data = FileAttachment("datafile.csv").csv({ typed: true })
data = data.map((d) => ({...d, "Fill Name": d.fill_name}))
Once this is done, I used replace all to change fill: "fill_name"
to fill: "Fill Name"
.
Through out the capacity, net/gross generation, and consumption pages, there are tooltips that have variable names as descriptors (e.g.,
fy: Coastal
). Go back through and adjust all tooltips so that they make sense (e.g.,ACEP Region: Coastal
).