Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FIX] 키워드 분석 페이지에서 그래프 깨짐 문제 해결 #92 #141

Merged
merged 1 commit into from
Apr 11, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,8 @@ export class KeywordAnalysisComponent implements OnInit, OnDestroy {
var height = this.height;
var width = this.width;

console.log("height: " , height, "width:", width);

function update(data) {
// Update the X axis
x.domain(data.map(d => d["date"]))
Expand Down Expand Up @@ -204,14 +206,15 @@ export class KeywordAnalysisComponent implements OnInit, OnDestroy {
//related to drawing chart
// set the dimensions and margins of the graph
this.margin = {top: 30, right: 30, bottom: 30, left: 60};
this.width = 460 - this.margin.left - this.margin.right;
this.height = 400 - this.margin.top - this.margin.bottom;
this.width = 460 - this.margin.left - this.margin.right; //460
this.height = 400 - this.margin.top - this.margin.bottom; // 400

// append the svg object to the body of the page
this.svg = d3.select("#keyword_analysis")
.append("svg")
.attr("width", this.width + this.margin.left + this.margin.right)
.attr("height", this.height + this.margin.top + this.margin.bottom)
.attr("viewBox", `0, 0, ${this.width + this.margin.left + this.margin.right}, ${this.height + this.margin.top + this.margin.bottom}`)
.append("g")
.attr("transform",
"translate(" + this.margin.left + "," + this.margin.top + ")");
Expand Down