
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
āAug 21, 2021 12:28 AM
Hi, any idea why is Vega-lite displaying the last month July 1 2022 of my table as the first month in my Chart, even before June 1 2021 ?!! this happen with whatever Date I start the table on.
It looks like a Bug (in Vega or AT) to me, displaying the last month before the first oneā¦
Anyone facing the same issue, Thanks !
See code used
{
"$schema": "https://vega.github.io/schema/vega-lite/v4.json",
"title": "Debug Test Chart ",
"width": "container",
"height": "container",
"mark": "bar",
"encoding": {
"x": {
"timeUnit": "month", "field": "DateTest",
"type": "nominal",
"sort": "x"
},
"y": {
"field": "VALUE",
"type": "quantitative"
},
"color": {
"field": "NAME",
"type": "nominal"
}
}
}
Solved! Go to Solution.
Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
āAug 23, 2021 12:01 AM
ok, I found that although sorting using Nominal as a Type does not return an error.
Sorting dates has to use
type : temporal
for only this one type will sort dates in the expected correct order.
solved :white_check_mark:

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
āAug 21, 2021 09:00 AM
Welcome to the community, @Eric_Terii! :grinning_face_with_big_eyes: I think you might have posted the wrong screenshot. What appears in the screenshot all looks good as far as I can see.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
āAug 21, 2021 01:31 PM
Hi Justin,
*I find it myself awkward that the pink column value for Dec - $14.00 - (corresponding to the Dicember month value) does appears at the very left side of my Graphā¦while I would expect it to be the Value from the Top Table Line to be displayed on this very Left side of Graphā¦hence : Orange January Column value - $17.00.
Since my Table is set to sort the Date Col values in Ascending orderā¦ I am expecting the Graph to (autosync and) also displays its value in the same order - or am I missing something here ?
*Iām not familiar with the Graph script syntax but if there is something re-sorting the Columns in a distinct order than the one from the table [Jan to Dicember], I would greatly appreciate to understand where/what is it ?
:face_with_monocle:
PS: True, by the way, the same problem occurs, whatever Coin is selected but here it is again
thanks
Iād want that Dec Pink Column to display on the very Right sideā¦ :man_shrugging:

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
āAug 21, 2021 11:17 PM
After a closer look, it appears that itās just the column labels that are off, not the actual values. The first columnāwhich is supposed to be Januaryāis correctly sized at 17 (looking at your second screenshot), but itās somehow labeled āDec.ā The rest are the same: correct values, but labels are one month early. I have no experience with the Vega Lite app, so I canāt offer much help beyond that, but I do know that the JSON object that you listed in your original post has nothing to do with the actual data that youāre displaying. It contains field names āDateTestā, āVALUE,ā and āNAME,ā but the screenshot of your table doesnāt contain any of those fields.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
āAug 21, 2021 11:31 PM
Hi,
Ok, Iām not experimented in Json myself, so, one way or the other, there is some problem with the labeling, I had thought about that, just as some setting allows one to set the Week to start on Sunday instead of Monday but I donāt see where/how in Airtable such setting can be modified, if even necessaryā¦as for a date/calendar settingā¦
:slightly_smiling_face:
{
"$schema": "https://vega.github.io/schema/vega-lite/v4.json",
"title": "ADA",
"width": "container",
"height": "container",
"mark": {
"type": "bar",
"point": {
"filled": true,
"color" : "white"
}
},
"encoding": {
"x": {
"timeUnit": "month", "field": "PERIOD",
"type":"nominal",
"sort": "x"
},
"y": {"field": "ADA","type": "quantitative"},
"color": {
"field": "ADA",
"type": "nominal"
}
}
}

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
āAug 23, 2021 12:01 AM
ok, I found that although sorting using Nominal as a Type does not return an error.
Sorting dates has to use
type : temporal
for only this one type will sort dates in the expected correct order.
solved :white_check_mark:
