Chartist-js: Edit column width ?

Created on 7 Aug 2015  路  4Comments  路  Source: gionkunz/chartist-js

How can I edit columns (a,b,c) width in a bar chart ?
Didn't found it in the doc.

Most helpful comment

I'm new to Chartist and I was looking for the same. I would be expecting this to be an option to be passed to the chart, but instead, by looking at the examples, CSS seems the only way it can be achieved:

.your-chart .ct-bar {
    stroke-width: 60px
}

All 4 comments

I'm new to Chartist and I was looking for the same. I would be expecting this to be an option to be passed to the chart, but instead, by looking at the examples, CSS seems the only way it can be achieved:

.your-chart .ct-bar {
    stroke-width: 60px
}

Do I have to change columns spacing too or it is automatic

Stroke witdth is controlled using CSS. Bar distance on multi series bar charts is controlled as an option in JavaScript seriesBarDistance ( see http://gionkunz.github.io/chartist-js/api-documentation.html#chartistbar-declaration-defaultoptions )

We keep a very strong separation of concerns for our library. Everything presentation related, should if possible, be done with CSS.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ShlomoRosenheimer picture ShlomoRosenheimer  路  3Comments

SimonTernoir picture SimonTernoir  路  5Comments

eddr picture eddr  路  3Comments

jbwl picture jbwl  路  4Comments

pathtoknowhere picture pathtoknowhere  路  4Comments