How can I implement this with CWGraph control?

Who can help me,i meet a difficult problem:
Now i have a form(historygraph.frm), four DTPicker controls(DTPicker1,DTPicker2,DTPicker3,DTPicker4), and three command control(cmdFind,cmdNextPage,cmdPreviousPage).
My database is SQL SERVER 2000,
In my table(mytable),I have two fields:
(1)savetime(datetime) (2)value(integer)
So DTPicker1 and DTPicker2 stand for the time that I want begin to find in the database table savetime field. DTPicker3 and DTPicker4 stand for the time that I want end to find in the database table savetime field.
DTPicker1.Format = dtpShortDate
DTPicker2.Format = dtpTime
DTPicker3.Format = dtpShortDate
DTPicker4.Format = dtpTime
When the user select the time query range.(from begin time to end time)
and press the command(cmdFind),I need these data value to display with the CWGraph control.Meanwhile,I must display the data savetime on X Axes,and the data value on Y Axes.
Because the amounts of data is very large,So I must display the Graph on limited amount,When the chartlength is full,user can press the Next Page command,also user can press the Previous Page command to look the last page data chart. The whole interval of the pages can set 1 hour or 3 hour and so on.
For Example:
data1 savetime:09:00:03,data1 value:1000
data2 savetime:09:00:08,data2 value:1020
data3 savetime:09:00:20,data3 value:2000
On the X Axes,display in order: 09:00:03 09:00:08 09:00:20 ...
I have complete the code that get the savetime and value when user select the datetime query range,But I can't display it with chart,and implement the function as I describe above.
Who can give me help ,how to use CWGraph control,How to set it,I have see the sample but can not solute this problem.
Please Help me,otherwhise My boss will ......
Thanks.

Okay, first you will want to use the PlotXvsY method of CWGraph. This method plots a 1D or 2D array of Y data against a 1D array of X data.
Place a CWGraph on your form. By default its name will be CWGraph1. You can change the format X axis by right-clicking on the graph and selecting Properties. On the Format tab, you will see that time is one of the Built-in format styles. Select the appropriate format string and press Apply. Anywhere you want the graph to plot your data you can place the command:
CWGraph1.PlotXvsY savetime, value
To view help on this method, you can type in the above command, place the cursor somewhere in the method call and press F1.
Now, in terms of displaying only part of the data, I recommend deciding the maximum number of data points you want displayed at a time. You can then create arrays of the desired subsets of times and values to display, and use these subsets in your call to PlotXvsY. If you create a Sub with arguments for selecting the subsets of data, the Sub could be called from the callbacks of your command buttons.
Regards,
Eric

Similar Messages

  • How can I implement this database?

    Okay, so if you are working with a company who owns more than 10 apartment complexes and they have asked you to build a database.
    So if I want to implement this database.
    What database software package should I use (SQL Enterprise or SQL Data Center) (do not know the difference between the two) or is there any other SQL version that can be used/considered
    Also what else would I have to build or buy? What combination of things do I need?
    What hardware is needed at each apartment complex?
    I was told that something off the shelf will not give me everything I need.

    Please do not duplicate posts. You already posted it here
    https://social.msdn.microsoft.com/Forums/sqlserver/en-US/5dfc3897-3ffb-490b-8e60-e775b43d3303/how-can-i-implement-this-database?forum=sqlgetstarted
    Andy Tauber
    Data Architect
    The Vancouver Clinic
    Website | LinkedIn
    This posting is provided "AS IS" with no warranties, and confers no rights. Please remember to click
    "Mark as Answer" and
    "Vote as Helpful" on posts that help you. This can be beneficial to other community members reading the thread.

  • Hi, Unfortunately my Laptop has died (which had my iTunes on it). I want to ensure my music on my iPhone 5 and my iPad Air are backed up. Also, I want to sort my music in the way I used to with iTunes. How can I do this with just these two devices?

    Hi, Unfortunately my Laptop has died (which had my iTunes on it). I want to ensure my music on my iPhone 5 and my iPad Air are backed up. Also, I want to sort my music in the way I used to with iTunes. How can I do this with just these two devices, i.e. NO Computer? Can the iCloud help? Why can't I download iTunes (i.e. my library as I saw it on the computer) to these devices? Thanks to anyone who can help me here.

    You can change the email address of one's appleID...
    I'd recommend changing moms email to yours to get a good backup on the Mac
    Then switch mom's back to hers
    Then change your account to the same email you used.
    I've done something similar when I needed to update my Apple account (one ID changing email addresses and phone)

  • I need to change a photo into a video file in order to post on youtube. How can I do this with my mac?

    I need to change a photo into a video file in order to post in youtube. How can I do this with my mac mini?

    When I go to import, the choices are :
    movies
    camera archive
    imovie for IOS
    imovie for HD
    It refuses to import a photo with any of these choices, which is located on the desktop or in a folder. It's a regular .jpg
    There are instructions to drag it. I put it there, and it bounces right back. The photo will not stay.
    I just need this one picture to go on so I can post a meditation on youtube.  It doesn't come from a camera.

  • How can I work lsmw with table control using mm01 appl?

    Hi
    How can I work lsmw with table control using mm01 appl?
    Is it difefrent the way we handle table control in BDC?
    Thank You

    Hi
    How can I work lsmw with table control using mm01 appl?
    Is it difefrent the way we handle table control in BDC?
    Thank You

  • We have a requirement to print the w2 forms for employees using java application, how can i implement this. Please give some suggestion.

    We have a requirement to print the w2 forms for employees using java application, how can i implement this. Please give some suggestion.

    Anyone any ideas to help please?

  • Trying to install Abode CS4 design standard Upgrade version. How can I install this with out having to install all my previous versions?  Thanks Mario

    Trying to install Abode CS4 design standard Upgrade version.
    How can I install this with out having to install all my previous versions?
    Thanks
    Mario

    You simply install it and input the required serials, including one of a previous product when asked for it.
    Download CS4 products
    Mylenium

  • I HAVE OS X 10.6.4, BUT NEED TO RUN SOFTWARE THAT REQUIRES POWERPC.  HOW CAN I DO THIS WITH LION?

    I HAVE OS X 10.7.4 (Lion), BUT I NEED TO RUN SOFTWARE THAT REQUIRES POWERPC.  HOW CAN I DO THIS WITH LION?

    If you are running Lion then you cannot run PPC software. Your computer would have to be capable of being booted by Snow Leopard in order to run PPC software. Or consider upgrading your PPC software or buying replacement software that works with Lion.
    What specific Mac model do you have?

  • New iPad Air 2 with a persisting blank screen. Support site suggests a restore after turning off 'Find my iPhone' on the device. How can I do this with a blank screen?

    New iPad Air 2 (December 2014) with a persisting blank screen. Support site suggests a restore after turning off 'Find my iPhone' on the device. How can I do this with a blank screen?

    Thanks JimHdk,
    After a little more searching across various online resources I was able to cure it by holding down the home button and the on/off button for 10 seconds to restart it and it all came back with a clear screen.

  • I am using Toast 11 to burn dvd's. With FCP10.1.3  I could go into the FCP shared folder grab the encoded .m2v file and drag it into Toast 11 and author dvd and burn.  How can you do this with FCP 10.1.4?

    I am using Toast 11 to burn dvd's. With FCP10.1.3  I used to go into the FCP shared folder grab the encoded .m2v file and drag it into Toast 11 and author dvd and burn.  How can you do this with FCP 10.1.4? 

    BenB it creates a disc image only and it's not in .m2v. I think it saved it as an Apple Pro Res 422 format instead. The disc image file format will not allow
    Toast 11 to create menus etc.  Thanks for your help.

  • I need to reload (resend information) multiple tabs in less than a second (I am playing Travian), but how can I do this with firefox for mac?

    When I try to send multiple attacks within a second playing Travian, it is impossible because it is too slow to confirm "resend information" on each tab, and it also takes too long to move from one tab to another. I've tried changing all the possible settings I can think of, but nothing seems to work.. This works fine if you have windows or linux, so how can I make this work with my mac, or do I have to get a pc just for that :( Thank you ever so much for helping me.. I've spent countless hours on this and I am just about to give up playing Travian because of this one stupid little thing :(

    It is working for me if I open a second Firefox instance with its own profile by starting Firefox with the -no-remote command line switch.
    * http://kb.mozillazine.org/Creating_a_new_Firefox_profile_on_Windows
    * http://kb.mozillazine.org/Shortcut_to_a_specific_profile
    * http://kb.mozillazine.org/Using_multiple_profiles_-_Firefox
    * http://kb.mozillazine.org/Bypassing_the_Profile_Manager
    Use the -no-remote command line switch to open another Firefox instance with its own profile and to run different Firefox instances simultaneously.
    * http://kb.mozillazine.org/Opening_a_new_instance_of_Firefox_with_another_profile

  • After updating iPod to iOS 5.0, cannot get into Game Center with previous nickname. It says my nickname is already in use by another account.  Why did this happen and how can I fix this with my old nickname and its data?

    After updating iPod Touch to iOs 5.0, I cannot get into Game Center with previous nickname.  The screen says my nickname is already in use by another account.  Why did this happen and how can I fix this so I can still use the same nickname?

    Did you haveany problem with updating to iOS 5? It soundsl like the update did not correctly restore from the backup that iTunes mnakes as the fisr step of the update.

  • Control Value:Set [Variant] Method - how can i use this with strict type definitions?

    I want to pass default values to a strict type definition from a mainVI to a subVI, but I'm not allowed to use the "Control Valueet [Variant] Method" invoke node to do it.  How else can I achieve this?
    thanks,
    Z

    Hi Z,
    If you use strict type defintion references you can use Call by reference Node. Depending on the connector pane for the subvi which is referenced you just wire your data to the corresponding terminals. I attach an easy example which dynamically opens and writes to an arbitary number of a template.
    Hope it helps
    Pelle S
    District Sales Manager
    National Instruments Sweden
    Attachments:
    Call by reference node.zip ‏20 KB

  • How can I implement This? - Via Multiple Threads

    Hi Friends,
    I m getting a list of 4000 emails in an ArrayList. Now I want to put 300 addresses in a mail at a time, and Want to create a new Thread and Send a Mail.
    I want to run 20 threads at a time to do so, Means Each thread is taking 300 addresses from array assigning it to Message and send it. After Sending it should return to ThreadPool.
    Also the 300 addresses should be removed from arraylist.
    Here are code snippet, i m using..
    MailBean.java - A bean which have all the MailProperty and Send Method.
    MailSender.java - It implements Runnable Interface, In its constructor A MailBean Object is Created and in run method it is sending the Mail.
    FileReader.java - It extends ArrayList, it takes a fileName, parse the Emails add email.
    Main.java - Here i want to send mails using ExecutorService class of java.util.concurrent.
    Mailer.java (Main Class)
    public class Mailer {     
         private final FileReader toEmails;
         private ArrayCollection<String> emails ;
         public Mailer(String addressFile){          
              toEmails = new FileCollection(addressFile);
              emails = new ArrayCollection<String>();
                          Here I want to read the 300 emails from toEmails append it in a String and add it to emails ArrayCollection.
        public static void main(String[] args) {
            try{
                 BlockingQueue<Runnable> queue = new ArrayBlockingQueue<Runnable>(200);
                 Executor e = new ThreadPoolExecutor(50, 50, 1, TimeUnit.SECONDS, queue);
                    if (args.length != 1) {
                         System.err.println("Usage: java ExecutorExample address_file" );
                         System.exit(1);
                  Mailer mailer = new Mailer(args[0]);
                  MailBean bean = new MailBean();
                  bean.setSubject("Mail Bean Test");
                  bean.setMessage("Hi This is a Test Message, Please Ignore this Message");
               /*  I want to run the send mails to all the emails (300 emails per String.) with the Exceutor.
                   Can somebody tell, I want a new object of MailSender for each mail
                   and sendmails
                 System.out.println("Creating workers");
                 for(int i = 0; i < 20; i++)
                     e.execute(new MailSender(bean));
                 System.out.println("Done creating workers");
            }catch(Exception ex){
                 ex.printStackTrace();
    } Can Somebody give me hint, How can we do it?

    The problem is the sound buffer. You may stop the method which dispatch the notes to be played... but not clear your sound card buffer....
    anyway: you should implement it in daemon threads. This way you can control the thread suspend, stop, restart, etc.
    use Thread.sleep(milliseconds);

  • How can I implement this??

    I want to play a sound and after a specific time period stop that sound and play another one. How can I stop the sound after a specific time period??
    Thanks

    The problem is the sound buffer. You may stop the method which dispatch the notes to be played... but not clear your sound card buffer....
    anyway: you should implement it in daemon threads. This way you can control the thread suspend, stop, restart, etc.
    use Thread.sleep(milliseconds);

Maybe you are looking for

  • Broken submit button on 2 firefox pages

    broken SUBMIT button on 2 firefox pages: http://input.mozilla.com/en-US/feedback#sad http://input.mozilla.com/en-US/feedback#idea Don't they want to know? hate to waste my time typing for no reason!

  • Problems downloading FMS developer edition

    Hi All, Please pardon me if I am writing in the wrong section. I'm having a problem trying to download FMS developer edition. Basically when I try to download I get a window where I have to update my address data, which I do so correcly. After that I

  • PE7 crashes at start when loading CompilerAIFF.prm

    Hi there, my Premiere Elements 7 crashes when i try to start it. After 2-3 Seconds it says "Loading CompilerAIFF.prm" and then it crashes. I tried to find a soluton via search etc. Can you help me pls?

  • Adding Application Server

    I couldn't find any resources on Google.... so please advise if possible :) Given a farm with only one application server, I know that if that server goes down, Central Administration is not accessible. If I wanted to make that tier safer, would it b

  • REG- OUTPUT determination

    Dear All,    Iam facing problem in configuration. After making the all the changes if I save  the screen, ticket is not getting generated in development so not able to transport in production. pls some one suggest what needs to be done. Thanks in adv