-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
9 additions
and
266 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 |
---|---|---|
@@ -1,4 +1,7 @@ | ||
{ | ||
"3.3.0.preview2": [ | ||
|
||
], | ||
"3.3.0.preview1": [ | ||
|
||
], | ||
|
Large diffs are not rendered by default.
Oops, something went wrong.
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 |
---|---|---|
|
@@ -579,4 +579,4 @@ | |
|
||
---- | ||
|
||
(Last updated on 2023-09-09 15:03:44 +0200) | ||
(Last updated on 2023-09-19 22:27:42 +0200) |
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
Large diffs are not rendered by default.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,66 +1,2 @@ | ||
window.onload = function () { | ||
// Chart Themes begin | ||
am4core.useTheme(am4themes_dark); | ||
am4core.useTheme(am4themes_animated); | ||
// Chart Themes end | ||
|
||
var chart = am4core.create("chartdiv", am4charts.XYChart); | ||
chart.hiddenState.properties.opacity = 0; // this creates initial fade-in | ||
|
||
chart.paddingRight = 30; | ||
chart.dateFormatter.inputDateFormat = "yyyy-MM-dd HH:mm"; | ||
|
||
var colorSet = new am4core.ColorSet(); | ||
colorSet.saturation = 0.2; | ||
|
||
chart.data = <%= ruby_versions.map { |rb| | ||
[*rb['minors']].map { |minor| | ||
color = minor['version'].split.last.split('.').map { |n| n.to_i + 1 }.reduce(:*) % 255 | ||
{ | ||
"category": "Ruby #{rb['version']}", | ||
"task": minor['version'], | ||
"start": minor['release_date'], | ||
"end": (minor['end_date'] != "" ? minor['end_date'] : Date.today.to_s), | ||
"color": "rgb(255, #{color}, 0)", | ||
"info": [ | ||
rb['state'], | ||
rb['implementations'], | ||
rb['changes'] | ||
].join("\n") | ||
} | ||
} | ||
}.flatten.to_json %> | ||
|
||
chart.dateFormatter.dateFormat = "yyyy-MM-dd"; | ||
chart.dateFormatter.inputDateFormat = "yyyy-MM-dd"; | ||
|
||
var categoryAxis = chart.yAxes.push(new am4charts.CategoryAxis()); | ||
categoryAxis.dataFields.category = "category"; | ||
categoryAxis.renderer.grid.template.location = 0; | ||
categoryAxis.renderer.inversed = true; | ||
|
||
var dateAxis = chart.xAxes.push(new am4charts.DateAxis()); | ||
dateAxis.renderer.minGridDistance = 70; | ||
dateAxis.baseInterval = { count: 1, timeUnit: "day" }; | ||
// dateAxis.max = new Date(2018, 0, 1, 24, 0, 0, 0).getTime(); | ||
//dateAxis.strictMinMax = true; | ||
dateAxis.renderer.tooltipLocation = 0; | ||
|
||
var series1 = chart.series.push(new am4charts.ColumnSeries()); | ||
series1.columns.template.height = am4core.percent(70); | ||
series1.columns.template.tooltipText = ` | ||
[bold]Ruby {task} | ||
{openDateX}[/] - {dateX}[/] | ||
`; | ||
|
||
series1.dataFields.openDateX = "start"; | ||
series1.dataFields.dateX = "end"; | ||
series1.dataFields.categoryY = "category"; | ||
series1.columns.template.propertyFields.fill = "color"; // get color from data | ||
series1.columns.template.propertyFields.stroke = "color"; | ||
series1.columns.template.strokeOpacity = 1; | ||
var bullet1 = series1.bullets.push(new am4charts.LabelBullet()); | ||
bullet1.label.text = "{task}"; | ||
|
||
chart.scrollbarX = new am4core.Scrollbar(); | ||
} |
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