Skip to content
This repository has been archived by the owner on Jul 6, 2023. It is now read-only.

Commit

Permalink
feat: change project chart type
Browse files Browse the repository at this point in the history
  • Loading branch information
ahmadalfy committed Feb 1, 2020
1 parent 1e8fc22 commit 1759abb
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
11 changes: 9 additions & 2 deletions scripts/charts.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,11 @@ class Charts {
return { data: formattedData, groupedEvents };
}

static drawChart(data, name) {
static drawChart(data, name, area) {
this.chart = Highcharts.chart('charts', {
chart: {
zoomType: 'x',
type: area,
},
title: {
text: `Activity of ${name}`
Expand All @@ -78,13 +79,19 @@ class Charts {
name,
data,
}],
tooltip: {
split: true,
},
plotOptions: {
series: {
cursor: 'pointer',
marker: {
lineWidth: 1
lineWidth: 1,
}
},
areaspline: {
fillOpacity: 0.5,
}
},
});
}
Expand Down
2 changes: 1 addition & 1 deletion scripts/projects.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ class Projects extends Base {
let projectEvents = await this.getProjectEvents(projectId);
const updatedEvents = Charts.prepareProjectEvents(projectEvents);
const { data } = updatedEvents;
Charts.drawChart(data, projectName);
Charts.drawChart(data, projectName, 'areaspline');
Charts.prepareChartFilters();
}

Expand Down

0 comments on commit 1759abb

Please sign in to comment.