Ticket T217329
Visible to All Users

Chart grid lines are not aligned

created 10 years ago

Hi,
i'm creating a report with a xrChart. As you can see in the image attached, grid lines are not aligned with axis X or Y indicators, although thickness of every element are set to 1.

Another questions is : How can i do the axis and grid lines more thin ( less than 1), i think, in several scenarios, are more elegant a very thin line, as MS excell does, specially when export or print to pdf.

thank you very much.

Comments (2)
Yaroslav (DevExpress Support) 10 years ago

    Hi Carles,
    Thank you for reaching out to our support team. Would you mind sharing your report layout with us (either stored in the .REPX file or in code behind), so we can try to reproduce this issue on our side? This will help us provide you with a solution ASAP. In the meantime, I'll contact our R&D team to see if there is any way to make grid lines' thickness less than one (by default it's impossible to do so since this value is held in a property of the integer type).

      hi,
      here it goes.
      if component data source saves the connection string encrypted, be aware to keep this information confidential.
      the grid lines appears not to be aligned already in design mode, and obviously they are not in preview or export format.
      if you need something else, let me know.
      thank you very much for your support.

      Answers approved by DevExpress Support

      created 10 years ago (modified 8 years ago)

      Hi Carles,
      Thank you for the provided report definition. Of course, this information will remain private. As a matter of fact, I've already deleted that .REPX file since no further investigation is required. It appears both of the raised by you issues have been discussed previously, and both of them are caused by implementation specificity, which are impossible to avoid. Let me elaborate:

      1. Axes and gridline thickness is measured in pixels only. No capability to draw lines thinner than one pixel. As a possible workaround, you assign a lighter color to the Axes and corresponding gridlines (I see you're already doing something similar to this).
      2. This issue is related to the EMF+ format vector scaling mechanism, so it's impossible to change this behavior in our code. Please refer to Axis tickmarks aren't aligned with grid lines for additional information in this regard. Pay special attention that this effect isn't reproduced under the 100% zoom factor and it also should not cause any shortcoming during printing or exporting.
        Feel free to contact us in case any further questions.
        Show previous comments (3)
        Yaroslav (DevExpress Support) 10 years ago

          Ah, you're right, Carles, I was exporting the chart as bitmap. Indeed, if a metafile is used to describe the sequence of recorded graphics operations, the same issue arises in the produced PDF file. Still, from my perspective, this shortcoming is almost neglectable under the 100% zoom magnifier. I understand the importance of this problem, but as it was already mentioned, the WMF format has specific rounding errors when calculating the resolution of the required elements, which makes it impossible to avoid this misbehavior in our code. Perhaps, we'll return to this issue once again in the future, but at the moment I don't have other information to share it with you. I appreciate your understanding. Should you have further questions, feel free to contact us.

            Hi Yaroslav,
            I found a workaround to minimize the problem. For anyone who has the same issue, i suggest him to play a little with tickmarks, increasing thickness twice the value of grid lines. And for more accurate solution, review the position of grid axes (XY), til fit in the desired thickness.
            greetings

            Yaroslav (DevExpress Support) 10 years ago

              Thank you for the hint, Carles. It looks almost perfect now. I believe now all issues have been resolved and I can close this ticket.
              Feel free to contact us at any time.

              Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

              Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.