Changed chart line colours.

This commit is contained in:
neviyn 2018-09-25 13:37:09 +01:00
parent ba36ddd5cb
commit 282942a893
3 changed files with 9 additions and 7 deletions

View File

@ -35,11 +35,11 @@ public class AverageStatsChartJs {
teamwork.add(averageStats.getTeamwork()); teamwork.add(averageStats.getTeamwork());
knowledge.add(averageStats.getKnowledge()); knowledge.add(averageStats.getKnowledge());
} }
datasets.add(new Dataset("Monitoring", "", monitoring)); datasets.add(new Dataset("Monitoring", "#F90", monitoring));
datasets.add(new Dataset("Control", "", control)); datasets.add(new Dataset("Control", "#3F0", control));
datasets.add(new Dataset("Conservatism", "", conservatism)); datasets.add(new Dataset("Conservatism", "#33F", conservatism));
datasets.add(new Dataset("Teamwork", "", teamwork)); datasets.add(new Dataset("Teamwork", "#FF0", teamwork));
datasets.add(new Dataset("Knowledge", "", knowledge)); datasets.add(new Dataset("Knowledge", "#000", knowledge));
} }
@AllArgsConstructor @AllArgsConstructor
@ -50,7 +50,7 @@ public class AverageStatsChartJs {
@NonNull @NonNull
@JsonProperty @JsonProperty
private final String borderColor; private final String backgroundColor;
@NonNull @NonNull
@JsonProperty @JsonProperty

View File

@ -67,6 +67,7 @@ public class ObservationResource {
@Path("/average/all/chartjs") @Path("/average/all/chartjs")
@GET @GET
@UnitOfWork
public AverageStatsChartJs averageStatsChartJs() { public AverageStatsChartJs averageStatsChartJs() {
return new AverageStatsChartJs(averageObservationScores()); return new AverageStatsChartJs(averageObservationScores());
} }
@ -81,6 +82,7 @@ public class ObservationResource {
@Path("/average/{id}/chartjs") @Path("/average/{id}/chartjs")
@GET @GET
@UnitOfWork
public AverageStatsChartJs averageObservationScoresForSiteChartJs(@PathParam("id") long siteId) { public AverageStatsChartJs averageObservationScoresForSiteChartJs(@PathParam("id") long siteId) {
return new AverageStatsChartJs(averageObservationScoresForSite(siteId)); return new AverageStatsChartJs(averageObservationScoresForSite(siteId));
} }

View File

@ -32,7 +32,7 @@ export default {
methods: { methods: {
getAllTimeAverage: function() { getAllTimeAverage: function() {
Vue.axios Vue.axios
.get("/api/average/all/chartjs") .get("/api/observation/average/all/chartjs")
.then(response => { .then(response => {
this.chartData = response.data; this.chartData = response.data;
}) })