In the Quiver transform table, I created a pivot table grouped by e.g. ticket_reporter_id
and aggregated by the mincreated
timestamp datatype.
However, the pivot table is displaying the min created as num. How can I format these num to a short date time format, similar to what is shown in the Workshop?
Additionally, could you provide a Vega plot as a bar chart with the following specifications:
- X-axis: The min date time short
- Y-axis:
ticket_reporter_id
."
What I’ve tried so far
In Workshop I was able to create same pivot table and format to date time short, but was not able to create chart as mentioned above, and this can be used, but will be more understandable for end-useres if I can show a bar chart.
Hi, you can use a “number to date” transform to convert the numeric column values into dates (and set the date column formatting in the “Display” tab of the right-hand configuration panel).
You can then use AIP configure to generate a vega chart spec for you that’s specific to the shape of your data, or try one of the examples from the Vega documentation https://vega.github.io/vega-lite/examples/
Thank you @melissaz
Question about vega-lite
Was able to create the chart, but got duplicated y-axis, why? My code as shown below.
{
“data”: {
“values”: $AA
},
“mark”: {
“type”: “line”,
“point”: {
“filled”: false,
“fill”: “white”
}
},
“encoding”: {
“x”: {
“field”: $AA.“output”,
“type”: “temporal”,
“timeUnit”: “yearmonthdate”,
“title”: “min.date registred”
},
“y”: {
“field”: $AA.“id”,
“type”: “ordinal”,
“title”: “User_ID”
},
“color”: {
“field”: $AA.“id”,
“type”: “ordinal”
}
}
}