Skip to content

Commit

Permalink
responsive charts
Browse files Browse the repository at this point in the history
  • Loading branch information
nrchtct committed Feb 20, 2025
1 parent 2359c0c commit 9fa0a45
Show file tree
Hide file tree
Showing 8 changed files with 24 additions and 18 deletions.
4 changes: 2 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
top: 0;
left: 0;
height: 100vh;
width: 65vw;
width: 50vw;
position: fixed;
background-color: #fff;
border: 0;
Expand All @@ -60,7 +60,7 @@
box-sizing: border-box;
position: absolute;
right: 0;
width: 35vw;
width: 50vw;
padding: 0 3vh;
margin: 0;
}
Expand Down
3 changes: 2 additions & 1 deletion vis/IEEEvis_citationHisto.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,6 @@
},
"y": {"aggregate": "count", "title": "Number of Papers"}
},
"config": {}
"width": 300,
"height": 300
}
6 changes: 3 additions & 3 deletions vis/IEEEvis_citeAndCited.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
"encoding": {
"x": {"field": "CitationCount_CrossRef", "type": "quantitative", "title": "Number of Papers referencing this paper"},
"y": {"field": "PubsCited_CrossRef", "type": "quantitative", "title": "Number of References"}
}


},
"width": 300,
"height": 300
}

3 changes: 2 additions & 1 deletion vis/IEEEvis_countPerConf.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"y": {"aggregate": "count", "field": "Title", "title": "Number of Papers"}
},
"config": {},
"width": 200
"width": 300,
"height": 300

}
10 changes: 4 additions & 6 deletions vis/IEEEvis_countPerConf_pie.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,12 @@
"description": "A simple bar chart with embedded data.",
"data": { "url": "data/IEEE VIS papers 1990-2023 - Main dataset.csv"},
"title": "IEEE VIS papers 1990-2023",

"config": {},
"width": 200,

"mark": "arc",
"encoding": {
"theta": {"aggregate": "count", "field": "Title", "title": "Number of Papers"},
"color": {"field": "Conference", "type": "nominal"}
}

},
"config": {},
"width": 300,
"height": 300
}
7 changes: 4 additions & 3 deletions vis/IEEEvis_overTime.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@
"$schema": "https://vega.github.io/schema/vega-lite/v5.json",
"usermeta": {"embedOptions": {"renderer": "svg"}},
"title": "IEEE conferences over time",
"data": {"url": "data/IEEE VIS papers 1990-2023 - Main dataset.csv"},

"data": {"url": "data/IEEE VIS papers 1990-2023 - Main dataset.csv"},
"mark": "bar",
"encoding": {
"x": {"field": "Year", "type":"nominal"},
"y": {"aggregate":"count", "field": "title", "type": "quantitative", "title": "Number of Papers"},
"color": {"field": "Conference", "type": "nominal"}
},
"config": {}
"config": {},
"width": 450,
"height": 300
}
4 changes: 3 additions & 1 deletion vis/IEEEvis_smallerConf.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,7 @@
"y": {"aggregate":"count", "field": "title", "type": "quantitative", "title": "Number of Papers"},
"color": {"field": "Conference", "type": "nominal"}
},
"config": {}
"config": {},
"width": 300,
"height": 300
}
5 changes: 4 additions & 1 deletion vis/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,10 @@
that.editable = false;
d3.select("svg").attr("width", null)
d3.select("svg").attr("height", null)
d3.select("svg").style("max-height", "300px")

d3.select("svg").style("max-height", "80vh")
d3.select("svg").style("max-width", "80vw")

d3.select("svg").style("margin-left", "10px")
d3.select(".chart-wrapper").style("width", "95vw")
d3.select(".chart-wrapper").style("text-align", "center")
Expand Down

0 comments on commit 9fa0a45

Please sign in to comment.