// Settings
var dataCount = true;
var valueAs = ['absolute', 'd', ' pcs']; // Change used value to absolute (instead of the default which is percentage), also change d3 format to 'd' and add ' pcs' at the end of text on y axis
var marginAuto = true; // Automatically change margins to fit axis texts
var graphSelectEnabled = false;
var width = 700;
var titleText = 'Stacked bars with absolute values';
var titleClass = 'cg-title';
// Source code for column-graphs.min.js
var columnGraphsJsContent = `
!function(t,e){"function"==typeof define&&define.amd?define(["d3"],function(n){return t.cg=e(n)}):"object"==typeof module&&module.exports?module.exports=t.cg=e(require("d3")):t.cg=e(t.d3)}(this,function(t){var e,n,a,r,o,l,c,s={addResizeFunc:function(t){J.add(t)},addTitle:function(t,e){!function(t,e){var n=document.getElementById(u.mainDiv);try{if(!n)throw"Div '"+u.mainDiv+"' not found"}catch(t){return void console.log("addTitle(): "+t)}var a=document.createElement("h1");a.innerHTML=t,e=e||"cg-title",a.classList.add(e),n.insertBefore(a,n.firstChild)}(t,e)},drawCompareCategories:function(t){B(!1,t)},drawStackedBars:function(t){k(t)},getArrayMax:function(t){V(t)},getArrayMin:function(t){var e;e=t,Math.min.apply(null,e)},getAxisTextWidths:function(t,e,n,a){q(t,e,n)},getConf:function(t){return u[t]},getTextColor:function(t){K(t)},getTextWidth:function(t,e,n){G(t,e,n)},initData:function(t,e,n){C(t,e,n)},initMetadata:function(t,e,n){var a,r,o;a=t,o=n,r=(r=e)||"Choices",o=o||"Groups",v=a[r]||{All:u.all},x=a[o]||{None:{none:u.none}},0===Object.keys(x).length&&x.constructor===Object&&(x={None:{none:u.none}})},initSvg:function(t,e,n){A(t,e,n)},removeResizeFunc:function(t){J.remove(t)},roundOneDec:function(t){_(t)},roundTwoDec:function(t){var...
Please Whitelist JSFiddle in your content blocker.
Help keep JSFiddle free for always by one of two ways:
Whitelist JSFiddle in your content blocker (two clicks)
Go PRO and get access to additional PRO features →
Join the 4+ million users, and keep the JSFiddle dream alive.
Ad-free
All ads in the editor and listing pages are turned completely off.
Use pre-released features
You get to try and use features (like the Palette Color Generator) months before everyone else.
Fiddle collections
Sort and categorize your Fiddles into multiple collections.
Private collections and fiddles
You can make as many Private Fiddles, and Private Collections as you wish!
Console
Debug your Fiddle with a minimal built-in JavaScript console.