Results 1 to 2 of 2

Thread: Copying a chart series to another

  1. #1

    Thread Starter
    Lively Member pourkascheff's Avatar
    Join Date
    Apr 2020
    Location
    LocalHost
    Posts
    94

    Copying a chart series to another

    Consider you have an array of charts, filled with one series of x,y points and you want to clone a specific one in another large chart (in another form) to perform a sort of magnification operation for selected member of that array.

    What is the proper approach to achieve such thing?

    How about a for loop to add points from here to another?
    Code:
    For i=0 to Me.Chart1.Series(0).Points.All then
                Form2.Chart1.Series(0).add = Me.Chart1.Series(0).Points(i)
            Next
    Codes are wrong. Only for understandin

    Or is there a property/method thing to shortcut looping?
    Code:
    Form2.Chart1 = Me.Chart1
    Codes are wrong. Only for understandin

    Don't know either ways. I just assumed they're possible ways.
    Thanks in advance/.
    Last edited by pourkascheff; Aug 15th, 2022 at 06:04 AM. Reason: minor syntax
    𝕬𝖒𝖎𝖗 𝕽. 𝕻𝖔𝖚𝖗𝖐𝖆𝖘𝖈𝖍𝖊𝖋𝖋

  2. #2
    Fanatic Member Delaney's Avatar
    Join Date
    Nov 2019
    Location
    Paris, France
    Posts
    803

    Re: Copying a chart series to another

    you have to do it the hard way : transfer the serie in a list

    use a list of tuple or use a list of pointf or create a structure named Points (if you want to use double)
    https://docs.microsoft.com/fr-fr/dot...a-types/tuples
    https://www.dotnetperls.com/tuple-vbnet
    https://docs.microsoft.com/fr-fr/dot...f?view=net-6.0
    The best friend of any programmer is a search engine
    "Don't wish it was easier, wish you were better. Don't wish for less problems, wish for more skills. Don't wish for less challenges, wish for more wisdom" (J. Rohn)
    “They did not know it was impossible so they did it” (Mark Twain)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width