1

I have this graph:

enter image description here

It was copied from excel, but as you can see, not all the bars have the same width. How do I apply the same width to all bars? Doing it manually is not an option as I have 24 more graphs to do this with that all have the same problem.

1

Me and surely many others have met the same problem. Fortunately this time you have got from the author more than the usual low res JPG screenshots of his Excel or Powerpoint graphs.

Excel optimizes the graphs for the screen display. The items are drawn so that the need of anti-alias blur is small. If the bars are only say about 4,5 pixels wide on Excel screen a part of them is drawn as 4px wide and a part as 5px wide to match the total width.

I do not know any automatic method to equalize the bar widths in Affinity Designer nor in other vector software after the bars are copied from Excel to the vector graphics program. Programmers may have what's needed to solve the problem, but I would start the job in Excel.

I wouldn't copy this graph to a graphics program:

enter image description here

There's so many bars in so narrow space that their widths vary 50%. I would copy this version:

enter image description here

You may say: "I cannot use that long version, the layout needs the shorter one!"

Copy both of them. Release the clipping masks, compound paths and groups. Separate the bars from the wide version as a group, scale them to the same total width as the narrow version and replace the original narrow bars with the scaled group. Vector graphics program doesn't make screen pixel border optimizations if that's not asked by setting something like "Snap to pixels" or "Pixel perfect" ON.

In the next image the upper version is the narrow version pasted directly from Excel. The lower version has the bars scaled and copied from the pasted wide version:

enter image description here

The wide version must be as high as the narrow version because the pixel border optimization happens also vertically.

Another option is to create the graph from the same data in vector graphics program which has graph tools which do not make it screen pixel perfect without asking.

Every presented method need a substantial amount of work, if you have a big bunch of graphs.

7
  • Feels like it should be a standard feature to change the size of many objects at once individually, but your method will work for now, thanks a lot! Oct 14 at 9:17
  • @VictorNielsen well theres the tranform each function in illustrator that does this but then i would just take teh data nad draw the graph directly in vectors. Also you ca expot the graph as svg if you copy via powerpoint (well atleast on windows, last time i tried in mac it failed, but iste been a few years since)
    – joojaa
    Oct 14 at 12:16
  • In your third paragraph you say "I do not master", but this doesn't make any real sense in English. Did you mean "I don't recommend", or perhaps "I don't use", or "I haven't found a way to [do something]"?
    – Billy Kerr
    Oct 14 at 13:51
  • 1
    Ok. I fixed it.
    – user287001
    Oct 14 at 14:12
  • @joojaa even if there were a way to set each width to the same absolute value (scaling the widths as percents is useless) it wouldn't be enough. Placing them side by side would also be needed.
    – user287001
    Oct 14 at 14:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.