3
dalist = {901, 503, 522, 1305} 

cogColors = {RGBColor[0, 0, 1], RGBColor[1, 0, 0], RGBColor[0, 1, 0], RGBColor[1, 1, 0]}

BarChart[dalist, ChartStyle -> cogColors] 

enter image description here

Is it possible to decrease the Bars Width ?

N West
  • 6,768
  • 25
  • 40
500
  • 6,509
  • 8
  • 46
  • 80

4 Answers4

5

I may be missing the point, but cannot you merely change the aspect ratio?

BarChart[dalist, ChartStyle -> cogColors, AspectRatio -> 3, ImageSize -> 120]

enter image description here

Mr.Wizard
  • 24,179
  • 5
  • 44
  • 125
4

Rather than changing the bar chart width, you can increase the bar spacing.

BarChart[dalist, ChartStyle -> cogColors, BarSpacing -> 1]

Bar chart with greater spacing

Alex
  • 9,313
  • 1
  • 39
  • 44
4

BarChart is not intended to do that. You can only change the spacings.

Use RectangleChart instead if you need finer control:

RectangleChart[{{{1, 1}, {1, 1}, {1, 1}}, {{2, 2}, {2, 2}, {2, 2}}}]

enter image description here

Dr. belisarius
  • 60,527
  • 15
  • 115
  • 190
2

See Heike's answer to my earlier question. You need to use RectangleChart. If you want to keep a constant distance between bar centres, so that the bar-plus-spacing takes up a constant space, you can use the ChartElementFunction option together with an auxiliary function, as shown in Heike's answer. (This might also do what you want using BarChart, but I'd still recommend RectangleChart.)

Community
  • 1
  • 1
Verbeia
  • 4,400
  • 2
  • 23
  • 44