ASE Home Page Products Download Purchase Support About ASE
ChartDirector General
Forum HomeForum Home   SearchSearch

Message ListMessage List     Post MessagePost Message

  Bargraph line Width
Posted by Karen on Oct-07-2017 02:34
Is there a way to control the line width of the outer boarder of the bars on a Bargraph?

I am producing high resolution bar graphs for printing... To do that I produce a large  chart picture with everything scaled up (lines, fonts etc) and then set the resolution of the bitmap graphic saved to 360DPI

In general that works OK most things, but the outer boarders of the bars are then too thin (hairlines just barely visible), and I don't see a method on the bar layer to be able to change that.

So is there a way to set bar border width?

Given the size of the package, I'm sure there are other other situations where one would need to control line widths but can't when scaling like this, but I have not run into them yet.

Between high DPI screens and printing issues. it would be nice if ChartDirector supported a scaling factor so we could design at one size (say 72DPI) and be able to supply chart director a scaling factor to output resolution we need.

Thanks,
-Karen

  Re: Bargraph line Width
Posted by Peter Kwan on Oct-09-2017 03:36
Attachments:
Hi Karen,

If you are referring to the border of the bars themselves, you can use the "Chart.flatBorder" style in ChartDirector 6.x.

As I am not sure of your programming language, it just randomly choose to use C# for the following example.

I have attached a chart sample based on the "Color Bar Chart" sample code in ChartDirector 6. The original sample code is at:

http://www.advsofteng.com/doc/cdnet.htm#colorbar.htm

I just modified the:

c.addBarLayer3(data, colors).setBorderColor(Chart.Transparent);

to:

c.addBarLayer3(data, colors).setBorderColor(0x000000, Chart.flatBorder(5));

Basically, I change the transparent border to a border 5 pixels in width.

For printing, one option is to output in PDF (or SVG if it is a web application). It can then be printed at any arbitrary resolution as determined by your printer.

Regards
Peter Kwan
colorbar.png