Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

ChartScale Height and Width Properties Incorrect in B5

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    ChartScale Height and Width Properties Incorrect in B5

    Please see image attaches. In the OnRender method the chartScale parameter has the wrong width and height values - only about 2/3 of the actual chart real estate.

    What's strange is that on another Windows 10 machine the chartScale parameter contains correct values.

    The code pictured produces the output shown on the chart. The rectangle should cover the entire chart area.
    Attached Files

    #2
    Hello,

    Thank you for the post.

    I wanted to further clarify, are you saying that this only happens on your windows 10 PC where others it does not?

    Could you provide an export of the script for testing purposes?

    I look forward to being of further assistance.
    JesseNinjaTrader Customer Service

    Comment


      #3
      Correct. Happens on some Win10 machines, not on others. All the script needed to reproduce is in the screenshot in the original post.

      Comment


        #4
        Hello,

        Thank you for the reply.

        Rather than guessing on the remainder of the code that is not in the image, I would rather like to test the same script you are to see if I can duplicate the issue to report it to development. Without the actual code I may not duplicate the code exactly as you had which would not assist in finding the issue.

        If you can provide an export or text version of the script I could further look into this.

        I look forward to being of further assistance.
        JesseNinjaTrader Customer Service

        Comment


          #5
          No problem. Please see the script attached, it produces the issue shown in the first post.
          Attached Files

          Comment


            #6
            More info on this bug - any value greater than 100% will cause this issue, proportional to the setting.
            Attached Files

            Comment


              #7
              Hello RanchoDinero,

              I've made a quick video testing these scripts and so far I have not been able to reproduce.
              http://screencast.com/t/cpd2m2wGl

              I do now see that a special setting of changing the DPI is required to reproduce the issue.

              Having the DPI (text size) setting larger than 100% will also cause some undesired behavior with NinjaTrader 7. In general, we have advised to set this back to 100% to resolve the issues with NT7, however, for NT8 I will forward this to our development department as a bug report.
              Chelsea B.NinjaTrader Customer Service

              Comment


                #8
                Thanks for sending this in.

                The ChartScale Height/Width is not converted to device pixels. This is not done for internal reasons. If you want to use these properites, you must use the .ConvertToVerticalPixels or .ConvertToHorizontalPixels extension methods provided.

                We'll have the docs updated to reflect that.

                Instead you can use any of the following which are converted:
                ChartPanel.X ChartPanel.Y, ChartPanel.W and ChartPanel.H

                You can also simply use the RenderTarget.PixelSize.Height and RenderTarget.PixelSize.Width
                MatthewNinjaTrader Product Management

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by Aviram Y, Today, 05:29 AM
                0 responses
                1 view
                0 likes
                Last Post Aviram Y  
                Started by quantismo, 04-17-2024, 05:13 PM
                3 responses
                25 views
                0 likes
                Last Post NinjaTrader_Gaby  
                Started by ScottWalsh, 04-16-2024, 04:29 PM
                7 responses
                34 views
                0 likes
                Last Post NinjaTrader_Gaby  
                Started by cls71, Today, 04:45 AM
                0 responses
                6 views
                0 likes
                Last Post cls71
                by cls71
                 
                Started by mjairg, 07-20-2023, 11:57 PM
                3 responses
                216 views
                1 like
                Last Post PaulMohn  
                Working...
                X