The reason that Observable JS treats our year variable as an integer and adds a comma is because the auto type import doesn't correctly parse the value as a year (it has no way to know that is true).
Proper Solution
After importing the data, run a transformation to convert the year column of the data with a version of year: new Date(year,0,1). This is still a little outside my expertise but I'll get there.
Current Solution
Format the display of the year values to actually be years in two places:
On the x-axis with: x: {tickFormat: "d"}
In the actual plot tip with tip: {format: {x: "d"}}
Along with this commit I changed the Prices graphs to use the Tip mark.
The reason that Observable JS treats our year variable as an integer and adds a comma is because the auto type import doesn't correctly parse the value as a year (it has no way to know that is true).
Proper Solution After importing the data, run a transformation to convert the year column of the data with a version of
year: new Date(year,0,1)
. This is still a little outside my expertise but I'll get there.Current Solution Format the display of the year values to actually be years in two places:
x: {tickFormat: "d"}
tip: {format: {x: "d"}}
Along with this commit I changed the Prices graphs to use the Tip mark.