Limiting Date {Axis X} and date {Axis Y} #9341
Unanswered
gutosantos-github
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello friends,
I am new on Vega-lite and I appreciate if you could give me some help to solve my Line Chart with Point Markers problem, please.
I am trying to plot a graph that shows Artist Name (Sum) in Axis Y and Released Year (of a music) in Axis X, and I wanto to compare with three playlists (Spotify, Deezer and Apple).
But because evething is appearing tohether and tight like in the picture, I dont know what to do.
This is my code:
function ex02(divWidth) {
return {
spec: {
width: divWidth,
data: {
values: spotify
},
"transform": [
{"calculate": "datum.released_year > 1969", "as": "aboveYear"}
],
"mark": {
"type":"line",
"point":"true"
},
"encoding":{
"x":{
"timeUnit":"year",
"field":"aboveYear"
},
"y":{
"aggregate":"mean",
"field":"in_spotify_playlists",
"type":"quantitative"
},
"color": {"field": "artist(s)_name", "type": "nominal"}
}
}
}
}
I am trying to make something comared to https://vega.github.io/vega-lite/examples/line_overlay.html
Thanks!!!
Beta Was this translation helpful? Give feedback.
All reactions