-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #12 from rajbos/chart-bugfix
Fix opening issues on Chart widget
- Loading branch information
Showing
10 changed files
with
68 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
async function createChart($container, chartService, alertTrendLines){ | ||
|
||
const datePoints = getDatePoints(); | ||
var chartOptions = { | ||
"hostOptions": { | ||
"height": "290", | ||
"width": "300" | ||
}, | ||
"chartType": "line", | ||
"series": | ||
[ | ||
{ | ||
"name": "Dependencies", | ||
"data": alertTrendLines.dependencyAlertsTrend | ||
}, | ||
{ | ||
"name": "Code scanning", | ||
"data": alertTrendLines.codeAlertsTrend | ||
}, | ||
{ | ||
"name": "Secrets", | ||
"data": alertTrendLines.secretAlertsTrend | ||
} | ||
], | ||
"xAxis": { | ||
"labelValues": datePoints, | ||
"labelFormatMode": "dateTime", // format is 2023-09-17 | ||
}, | ||
"specializedOptions": { | ||
"includeMarkers": "true" | ||
} | ||
}; | ||
|
||
try { | ||
chartService.createChart($container, chartOptions); | ||
} | ||
catch (err) { | ||
console.log(`Error creating chart: ${err}`); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters