Plot.text is not showing up

Previously, I had this notebook which would display flag emoji on top of each person w.r.t country.
Recently it is not rendering it anymore.

  • What is going wrong here?
  • How do I switch Observable/plot version on my notebook? I’m sure it worked in Plot v0.4.3.

It used to look something like this -
image

Hmmm, I think if you change change
Plot.textX(holidaysPerPerson, {
to
Plot.text(holidaysPerPerson, {
it should work…

1 Like

You should be using Plot.textY rather than Plot.textX. Here is a suggestion you can merge:

https://observablehq.com/compare/b5c399e5451de11e...71570b94c30c2205

With Plot.textX, the interval option affects the y channel which is here nominal (the name column). As a result all of your y values are undefined and no text marks are being displayed. Presumably you intend the temporal d3.utcDay interval to apply to the temporal x channel instead; that will happen if you switch to Plot.textY.

(If you use Plot.text, the interval option will be ignored, which is also fine in this case because your dates are already at UTC midnight, but it’s a bit misleading since the option is ignored. Prior to Plot 0.5.0, the text mark did not support the interval option, which is why it worked previously.)

As an aside, be careful about using flag emojis as Windows does not show them by default.