Spacing between bars


https://www.nevron.com/Forum/Topic12396.aspx
Print Topic | Close Window

By rich dudley - 6 Years Ago
Are these irregularities between the bars due to your pixel snapping? Is there anyway of dealing with this aside from making everything larger?
https://www.nevron.com/forum/uploads/images/8c620c8e-6e99-4854-b014-c1f4.png
By Nevron Support - 6 Years Ago
Hi Rich,
Yes they are however an easy workaround would be to render the SVG larger in which case the pixel snapping will not be that obvious. We can also add a property to the bar series telling it not to snap bars in which case the SVG export will look good at this size.
By rich dudley - 6 Years Ago
I tried that, and to get something that looked better I had to go up to 400% of my original size.  The image can then be scaled back down once its been converted to vector art, but that causes problems with the font size.  I would really like to be able to turn off pixel snapping, it causes problems and in this situation the output is vector are that shouldn't care about the pixels anyways.  Whats the process for adding a feature like that as you mentioned in your first reply?
By Nevron Support - 6 Years Ago

Hi Rich,
We've added two properties to the bar series that allow you to switch off the pixel rounding for x and y coordinates. The properties are - EnableXPixelSnapping and EnableYPixelSnapping, so in your case you need to write:
barSeries.EnableXPixelSnapping = false;

You need to download the latest version from our site in order for this to work...

By rich dudley - 6 Years Ago
You guys are the best! Entirely solved the issue. Maybe something to keep in mind for future releases for those of us who are outputing vector art? I've definitely had some trouble with pixel snapping in other places, its frustrating to be limited by pixels when the output doesn't need to be.  Maybe something like:
NCartesianChart chart = (NCartesianChart)chartControl.Charts[0];
chart.EnablePixelSnapping = false;

Thanks again for being so responsive!
By Nevron Support - 6 Years Ago
Thanks Rich,
Regarding the suggestion - it will be difficult to intercept all pixel snapping that occurs currently in Nevron Chart for .NET, however we'll have this feature in mind when we continue to develop the cross platform edition of the control. Thanks again Smile.