We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 36f3e3d commit f869b1fCopy full SHA for f869b1f
pygal.js
@@ -1,5 +1,7 @@
1
export const config = {
2
renderChart: (chart) => { throw new Error("The config.renderChart function has not been set for pygal."); }
3
+ availableWidth: 400,
4
+ availableHeight: 300,
5
};
6
7
const COLORS = [
@@ -69,8 +71,8 @@ class Chart {
69
71
});
70
72
}
73
- const defaultWidth = config.availableWidth || 400;
- const defaultHeight = Math.min(defaultWidth, config.availableHeight || 300);
74
+ const defaultWidth = config.availableWidth;
75
+ const defaultHeight = Math.min(defaultWidth, config.availableHeight);
76
77
let chart = {
78
chart: {
0 commit comments