Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Using onrender

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

    Using onrender

    I'm using the following code succefully,

    Code:
     // restricting this loop to only the ChartBars.From/ToIndex limits the loop to only what is visible on the chart
    for (int barIndex = ChartBars.FromIndex; barIndex <= ChartBars.ToIndex; barIndex++)
    {
    However when I adjust the chart horizontally to see more of the screen I notice that the Squares are are being painted on the onrender section are duplicated to the new "Visible" portion on the left.

    What would be causing this?

    #2
    Hello r3n3v,

    Thank you for your reply.

    Could you provide a screenshot illustrating what you mean by the squares being duplicated to the newly visible portion of the chart? We would expect that moving the chart would cause OnRender to be triggered and redraw objects on the newly visible bars.

    Thanks in advance; I look forward to assisting you further.

    Comment


      #3
      I've attached an example.
      Attached Files

      Comment


        #4
        Hello r3n3v,

        Thank you for your reply.

        I've conferred with my team and we're not entirely sure we understand. I would like to confirm some basics:

        The indexes in the FromIndex > ToIndex loop would be used with ChartControl.GetXByBarIndex to get X coordinates for what we actually want to give to RenderTarget.Draw to draw items on the chart (for only what is visible)

        FromIndex is always the left visible bar and ToIndex is the right most visible bar. Moving the chart will cause these values to change and OnRender to be triggered, which would recalculate over all bars currently in view..



        Can you confirm that's what you're doing, and clarify and provide a simple example that shows exactly what you are inquiring on if this does not resolve the issue?

        Thanks in advance; I look forward to assisting you further.

        Comment


          #5
          Thanks for your input.. Let me review my code...

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Geovanny Suaza, 02-11-2026, 06:32 PM
          0 responses
          580 views
          0 likes
          Last Post Geovanny Suaza  
          Started by Geovanny Suaza, 02-11-2026, 05:51 PM
          0 responses
          336 views
          1 like
          Last Post Geovanny Suaza  
          Started by Mindset, 02-09-2026, 11:44 AM
          0 responses
          103 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Started by Geovanny Suaza, 02-02-2026, 12:30 PM
          0 responses
          554 views
          1 like
          Last Post Geovanny Suaza  
          Started by RFrosty, 01-28-2026, 06:49 PM
          0 responses
          552 views
          1 like
          Last Post RFrosty
          by RFrosty
           
          Working...
          X