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

Message ListMessage List     Post MessagePost Message

  .setGridWidth 0.25 pixels
Posted by Dan on Mar-21-2017 18:27
Hi,

I'm using CD to create vector PDF's that are used in newspapers for print:

Is it possible to create hairline style lines for background grids for instance?

An example:
   .setGridWidth = 0.25


I understand that there's no need for this feature if producing bit mapped graphics but It would have been really nice to have it for vector graphics.

  Re: .setGridWidth 0.25 pixels
Posted by Peter Kwan on Mar-22-2017 00:51
Hi Dan,

Unluckily, ChartDirector does not support fractional line width. May be you can consider to use a very light semi-transparent line color. In many cases, it can give the impression of a very thin line.

Regards
Peter Kwan

  Re: .setGridWidth 0.25 pixels
Posted by Dan on Mar-22-2017 16:51
Thanks

  Re: .setGridWidth 0.25 pixels
Posted by Gerard Troost on Feb-18-2021 00:03
Hi,

I found this post. Is this still not possible? My graphs are looking perfect in pdf and can be placed into the documents without resizing but the lines are way to fat. Is there any work arround for this?

Thanks
Gerard

  Re: .setGridWidth 0.25 pixels
Posted by Peter Kwan on Feb-18-2021 03:05
Hi Gerand,

The minimal line width is still 1 pixel.

PDF is similar to SVG. If the chart is output in PDF or SVG, the image is scalable, and the actual size on screen depends on your viewer. If you think a one pixel thick line is "way too fat", is it possible that you viewer magnify the chart (that is, you viewer the chart at a zoom level above 100%)?

For example, if the chart is created as 600 x 400 pixels with line width of 1 pixel, but you view the PDF chart at 300% zoom level, then the 1 pixel line will become 3 pixels wide. It is because your view magnified it by 3 times.

If you create the chart as 1800 x 1200 pixels with 1 pixel thick lines, and view it as 900 x 600, the line will become 0.5 pixels thick, because you viewer shrink the line.  So one method to get a thin line is to create a big chart, and the view it at a smaller size.

The PDF can include a dpi parameter that specifies how to convert pixel size to physical size. The default is 96 dpi. If you use a higher dpi, everything will become smaller when printed on paper, including the line width. Many viewer will use the dpi to determine the default display size. (Of course, the user can always change the zoom level.) The dpi can be configured using BaseChart.setOutputOptions:

https://www.advsofteng.com/doc/cdphp.htm#BaseChart.setOutputOptions.htm

Regards
Peter Kwan

  Re: .setGridWidth 0.25 pixels
Posted by Gerard Troost on Feb-20-2021 00:12
That dpi parameters did it, thanks!