diff --git a/src/fr/devinsy/statoolinfos/htmlize/charts/BarChart.java b/src/fr/devinsy/statoolinfos/htmlize/charts/BarChart.java
index d81aacd..d4f63b3 100644
--- a/src/fr/devinsy/statoolinfos/htmlize/charts/BarChart.java
+++ b/src/fr/devinsy/statoolinfos/htmlize/charts/BarChart.java
@@ -35,6 +35,7 @@ public class BarChart
private StringList labels;
private BarChartDatasets datasets;
private boolean stacked;
+ private boolean animated;
/**
* Instantiates a new bar chart.
@@ -49,6 +50,7 @@ public class BarChart
this.labels = new StringList();
this.datasets = new BarChartDatasets();
this.stacked = false;
+ this.animated = true;
}
/**
@@ -163,6 +165,11 @@ public class BarChart
return this.title;
}
+ public boolean isAnimated()
+ {
+ return this.animated;
+ }
+
public boolean isDisplayTitle()
{
return this.displayTitle;
@@ -173,6 +180,11 @@ public class BarChart
return this.stacked;
}
+ public void setAnimated(final boolean animated)
+ {
+ this.animated = animated;
+ }
+
public void setDisplayTitle(final boolean displayTitle)
{
this.displayTitle = displayTitle;
diff --git a/src/fr/devinsy/statoolinfos/htmlize/charts/BarChartView.java b/src/fr/devinsy/statoolinfos/htmlize/charts/BarChartView.java
index 7bb892b..6505145 100644
--- a/src/fr/devinsy/statoolinfos/htmlize/charts/BarChartView.java
+++ b/src/fr/devinsy/statoolinfos/htmlize/charts/BarChartView.java
@@ -117,6 +117,10 @@ public class BarChartView
lines.append(" },\n");
lines.append(" stacked: ").append(chart.isStacked()).appendln(",");
lines.append(" }]\n");
+ lines.append(" },\n");
+ lines.append(" animation:\n");
+ lines.append(" {\n");
+ lines.append(" duration: ").append(chart.isAnimated() ? 1000 : 0).appendln();
lines.append(" }\n");
lines.append(" }\n");
lines.append("}");