Plot a 2D Graph as Date being on X-Axis

hi all,
I'm a quite a new bee to Java 2D an would like to know if there are any possibilities to plot a graph in java 2D with X Axis representing Date.
I would need a graph somewhat like
Y
|_____
| _______
|
|_____
|
|________________________ X Axis = Date ->
I have to plot a graph which has a Blocks (consisting of Start & end Dates).
So my graph looks like as shown above and starting point of my graph being the start date of Block & End point being End Date respectively.
Any help in this regard will be highly appreciable.
Thanx
Ati

import java.awt.*;
import java.awt.font.*;
import java.awt.geom.*;
import java.text.*;
import java.util.*;
import javax.swing.*;
public class PlottingData extends JPanel {
    int[] xVals;
    int[] yVals;
    final int MIN = 50;
    final int MAX = 100;
    final int PAD = 25;
    public PlottingData() {
        // Create a couple of "dates".
        Calendar start = Calendar.getInstance();
        start.setTime(new Date());
        Calendar end = Calendar.getInstance();
        end.setTime(start.getTime());
        end.add(Calendar.DAY_OF_MONTH, 16);
        DateFormat df = new SimpleDateFormat("dd MMM");
        System.out.printf("start = %s  end = %s%n",
                           df.format(start.getTime()),
                           df.format(end.getTime()));
        // Calculate the number of days in between.
        Date difference = new Date(end.getTime().getTime() -
                                   start.getTime().getTime());
        Calendar c = Calendar.getInstance();
        c.setTime(difference);
        int days = c.get(Calendar.DAY_OF_MONTH);
        System.out.println("days = " + days);
        // Instantiate xVals.
        xVals = new int[days];
        // Prepare to count from start to end in days.
        int startDay = start.get(Calendar.DAY_OF_MONTH);
        int endDay = end.get(Calendar.DAY_OF_MONTH);
        Calendar counter = Calendar.getInstance();
        counter.setTime(start.getTime());
        // Initialize elements of xVals array.
        for(int j = 0; j < days; j++) {
            counter.add(Calendar.DAY_OF_MONTH, 1);
            xVals[j] = counter.get(Calendar.DAY_OF_MONTH);
        //System.out.printf("xVals = %s%n", Arrays.toString(xVals));
        // Instantiate yVals array and initialize its elements.
        yVals = new int[days];
        Random seed = new Random();
        for(int j = 0; j < yVals.length; j++) {
            yVals[j] = MIN + seed.nextInt(MAX-MIN+1);  // [50 - 100]
        //System.out.printf("yVals = %s%n", Arrays.toString(yVals));
    protected void paintComponent(Graphics g) {
        super.paintComponent(g);
        Graphics2D g2 = (Graphics2D)g;
        g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
                            RenderingHints.VALUE_ANTIALIAS_ON);
        int w = getWidth();
        int h = getHeight();
        double xInc = (double)(w - 2*PAD)/(xVals.length-1);
        double yInc = (double)(h - 2*PAD)/(MAX - MIN);
        //System.out.printf("xInc = %.1f  yInc = %.1f%n", xInc, yInc);
        // Origin of graph:
        double x0 = PAD;
        double y0 = h-PAD;
        // Draw ordinate.
        g2.draw(new Line2D.Double(PAD, PAD, PAD, h-PAD));
        // Draw tick marks.
        for(int j = MAX-MIN; j >= 0; j -= 10) {
            double y = y0 - j*yInc;
            g2.draw(new Line2D.Double(x0, y, x0-2, y));
        // Label ordinate.
        Font font = g2.getFont();
        FontRenderContext frc = g2.getFontRenderContext();
        LineMetrics lm = font.getLineMetrics("0", frc);
        float height = lm.getAscent() + lm.getDescent();
        for(int j = 0; j <= MAX-MIN; j += 10) {
            String s = String.valueOf(j+MIN);
            float width = (float)font.getStringBounds(s, frc).getWidth();
            float x = (PAD - width)/2;
            float y = (float)(y0 - j*yInc + lm.getDescent());
            g2.drawString(s, x, y);
        // Draw abcissa.
        g2.draw(new Line2D.Double(PAD, h-PAD, w-PAD, h-PAD));
        // Draw tick marks.
        for(int j = 0; j < xVals.length; j++) {
            double x = PAD + j*xInc;
            g2.draw(new Line2D.Double(x, y0, x, y0+2.0));
        // Label abcissa with xVals.
        float sy = h - PAD + (PAD + height)/2 - lm.getDescent();
        for(int j = 0; j < xVals.length; j++) {
            String s = String.valueOf(xVals[j]);
            float width = (float)font.getStringBounds(s, frc).getWidth();
            float x = (float)(PAD + j*xInc - width/2);
            g2.drawString(s, x, sy);
        // Plot data.
        g2.setPaint(Color.red);
        for(int j = 0; j < yVals.length; j++) {
            double x = x0 + j*xInc;
            double y = y0 - (yVals[j] - MIN)*yInc;
            g2.fill(new Ellipse2D.Double(x-1.5, y-1.5, 4, 4));
    public static void main(String[] args) {
        JFrame f = new JFrame();
        f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        f.add(new PlottingData());
        f.setSize(400,400);
        f.setLocation(200,200);
        f.setVisible(true);
}

Similar Messages

  • How do I get the numbers ipad app to plot a graph of dates against values, where the most recent date is on the right of the graph, but the most recent date is at the top rather than bottom of the rows in the table?

    How do I get the numbers ipad app to plot a graph of dates against values, where the most recent date is on the right of the graph, but the most recent date is at the top rather than bottom of the rows in the table?
    Also how can it be a line graph without plotting a circle at each value?
    Thanks this is very frustrating

    Make a copy of the table and produce your Line chart or Bar chart from the copy. Sort the copy into the order you want to see in your chart.
    Alternately you could use a Scatter Chart...
    Jerry

  • How to plot a log graph using grapher with a given set of data

    hi there,
    im just wondering is it possible to plot a log graph in the grapher software with a given set of data, and also give an error bar and a best-fit line for it?
    so here is the set of data,
    Concentration of BCh (M)
    Mean % Specific Binding (%)
    Standard Deviation
    3 ×10⁻⁹
    71.52
    9.52
    1 ×10⁻⁸
    57.30
    8.56
    3 ×10⁻⁸
    39.15
    9.40
    1 ×10⁻⁷
    24.13
    10.15
    3 ×10⁻⁷
    14.77
    3.31
    1 ×10⁻⁶
    7.22
    2.02
    hope someone could help

    Try these:
    http://y.barois.free.fr/grapher/Bienvenue.html
    http://homepage.mac.com/tlindywizdumb/math/Grapher_index.htm
    http://homepage.mac.com/tlindywizdumb/math/Grapher/Grapher_HowTo.pdf

  • Read from spreadshee​t and plot multiple XY graph

    I'm trying to read a text file using the "Read from Spreadsheet" function. Next I want to plot the data in it on a single XY Graph.
    The text file contains 4 coloums and the first coloumn is X axis and rest are for Y axis. I'm not able to get the multiple plots. 
    However, I could get it to plot when only a single graph is to be plotted(only 2 coloumn in file). I've attached my VI and a picture here.
    I need help in plotting multiple XY graph from the text file with the 4 coloumns.
    Solved!
    Go to Solution.
    Attachments:
    Test_1.vi ‏13 KB

    Here's a more scalable solution, useful if you have one x and many y columns.
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    MultiXY.png ‏5 KB
    MultiXY.vi ‏10 KB

  • Problem Plotting a Line Graph

    I am trying to plot some line graphs on Numbers and am a new user.
    I can't seem to work out an issue. I want the numbers on the X axis to ascend from 0 onwards from left to right but at the moment they are descending from 10 to 0 left to right.
    How can I change this so the graph is plotted logically?
    Thanks in advance

    There are two basic types of X-Y charts.  All but one are "category" charts where the X axis is evenly spaced and the "numbers" are actually text. The data will be presented in the order listed in your table.  The other is a scatter chart. The icon for this chart looks like a shotgun blast.
    If your X axis numbers are evenly spaced (0,1,2,3...) you can use either type of chart.  Sort your table in ascending order and it will chart as you want it to.
    If your X axis numbers are not evenly spaced (such as 1,2,4,5,10) and you want the chart to be a true X-Y plot of the data, you have to use the scatter chart.  In contrast to the category charts where the X axis values must be in a header column/row, a scatter chart requires the X and Y data to be in data cells. You may have to move your data over a column so the X data is not in a header column.

  • Plot multiple days of realtime data on a wavechart

    I have real time data from a weather station that I need to plot. I have made wavewcharts of the the data and it plots on 2 min interval (the sampling interval of the incoming port) then I would like to have plots with 7 days of data on them. past 7 days basically.  I have manged to set the realtime date and time on the x-scale but I can not get it to display more than 2 hours at a time. If I set the x scale max and min, it seems not to update the graph correctly.
    All tips and help would be greatly appreciated
    Thanks!! 

    There are a few things you need to set.
    You said you're plotting once every 2 minutes. I assume this means that you're wiring a value into the chart only once every 2 minutes. This is important because charts calculate the time based on the starting time (offset) and the difference between each 2 points (multiplier).
    So:
    Make sure you're only wiring a value into the chart once every 2 minutes (has to be constant).
    Set the offset property to the current time when you start (use Get Date\Time in Seconds and then To DBL to convert to a numeric).
    Set the multiplier property to 120.
    Set the history length to 5040 (30*24*7).
    Try to take over the world!

  • Graphing loses Date/Time stamp.

    I use Field Point to collect pressure and temperature data. The each channel is calibrated for span and offset then stored and graphed. When I combine the array of pressures and send it to a date/time graph the date ends up being a random date. I find it absurd that NI has not fixed this simple problem. I have spent months working with them and all they have done is add pages of code and 60+ shift registers to fix such a simple problem.
    Is there a smart programmer out that that can do this easily. Of the 5-6 NI programmers I have worked with. None of them have been able to give me a simple fix to this problem
    Thanks for any advice.

    Can you post any of the code?
    Mike...
    Certified Professional Instructor
    Certified LabVIEW Architect
    LabVIEW Champion
    "... after all, He's not a tame lion..."
    Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First Steps

  • Do you know a VI or a mean to remove plots from a graph?

    I'd like to remove plots from a graph and i know their
    x-cordinate do you know a VI or a mean to remove them?
    Thank you for yours answers.

    A graph is just a display of different points in graphical form. You can actually get the points out of the graph, remove the points of the plot you want to take out from the array, and put it back into the graph.
    Another way I've done it is to use the property nodes, and make the color of the line on the graph transparent. That way, the data is still there, but the plot is invisible.
    Mark

  • Two plots on one graph....

    Hi
    I am running a project where I need to follow a plot on a graph. Currently both the plots are being plotted on the graph at the same time (i am using a waveform chart) so it is hard to follow as I have to anticipate where it will be next.What i would like to do is have the plot I want to follow already displayed on the graph and then as I run the VI the new plot is written in real time.
    Is this possible?

    Here's what I had in mind (LabVIEW 8.2)
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    IncrementalPlots.vi ‏14 KB

  • How to build query to give daily balance across bank accounts? (to then plot in a graph)

    How would one build a query to give daily balance across bank accounts? (to then plot in a graph)
    Assumptions:
    * There is a table TRANSACTIONS which includes columns TRANS_DATE, AMOUNT and BANK_ID. It does NOT include a column for balance. So current balance for a bank account is the sum of the AMOUNTs for that BANK_ID for example. Balance on date XX will be the sum
    of all AMOUNTS for that BANK_ID for all TRANS_DATE's prior and including the date XX.
    * There is not necessarily transactions on every day for each bank
    * Table BANKS which has BANK_ID and TITLE
    Would like a query that gives: Supply StartDate and EndDate for the query:
    Date Bank1Balance Bank2Balance Bank3Balance TotalBalance
    1/1/15 $100 $200 $100 $400
    1/2/15 $200 $200 $100 $500
    etc

    You'll find examples of queries for computing balances in various contexts in Balances.zip in my public databases folder at:
    https://onedrive.live.com/?cid=44CC60D7FEA42912&id=44CC60D7FEA42912!169
    If you have difficulty opening the link copy its text (NB, not the link location) and paste it into your browser's address bar.
    The queries in this little demo file return balances per transaction, however, whereas you appear to wish to return balances at close of business per day.  This can easily be done by means of a subquery which sums all transactions to date.  To return
    balances for all dates regardless of whether or not any transactions have been undertaken on the day, an auxiliary calendar table can be introduced into the database to plug the gaps,  The Calendar.zip file in my same OneDrive folder has means of generating
    such a table.
    With the introduction of an auxiliary calendar table into the database a query can then be written to return the balance per customer at close of business per day over the period 2009 - 2012 covered by the data in the Transactions table:
    SELECT CustomerID, Firstname, LastName, calDate,
       (SELECT SUM(TransactionAmount)
         FROM Transactions
         WHERE Transactions.CustomerID = Customers.CustomerID
         AND Transactions.TransactionDate <= Calendar.calDate) AS Balance
    FROM Calendar,Customers
    WHERE calDate BETWEEN #2009-01-01# AND #2012-12-31#
    ORDER BY CustomerID, CalDate;
    Rows for each customer/date are returned by means of the Cartesian product of the Calendar and Customers tables (the latter analogous to your Banks table), and the subquery returns the balance at close of each day by correlating the Transactions table with
    the Customers and Calendar tables, returning the sum of all transactions per customer up to and including the date in question.  In this example credit and debit transactions are expressed as positive and negative values in a single column of course,
    but where separate credit and debit columns are used its merely a case of summing (Credit-Debit), as done in some of the examples in my demo.
    To return the data in a horizontal format per date I'd suggest the use of a report which returns one row per date, and within it a multi-column subreport in across-then down column layout, linking the subreport to the parent report on the date columns.
    Ken Sheridan, Stafford, England

  • Dialog programming, data being washed out in TAB Control

    Hi,
         i am working on dialog programming , in which i am using Table Control  for user input (data is not coming from database table) . everything is going well till assignment of data to internal table but when
    control goes to PBO by any means like pressing ENTER etc. then data being washed out.
    PROCESS BEFORE OUTPUT.
      MODULE TC_CONTROL.
      LOOP AT it_data
             INTO wa_data
             WITH CONTROL tc_control
             CURSOR tc_control-current_line.
        MODULE tc_control_get_lines.
      ENDLOOP.
    PROCESS AFTER INPUT.
    LOOP AT IT_DATA.
        CHAIN.
          FIELD WA_DATA-FREPS_N.
          FIELD wa_data-TOEPS_N.
          FIELD wa_data-PRCH_A.
          FIELD wa_data-SRVC_AMT .
          FIELD wa_data-ACCNT_C.
          FIELD wa_data-AMT_D.
          FIELD wa_data-NARR_X.
          FIELD wa_data-CRPRD_N.
          MODULE tc_control_modify ON CHAIN-REQUEST.
        ENDCHAIN.
      ENDLOOP.
    *Abap program
    MODULE TC_CONTROL OUTPUT.
    DESCRIBE TABLE it_data LINES tc_control-lines.
    ENDMODULE.                 " TC_CONTROL  OUTPUT
    CONTROLS: TC_CONTROL TYPE TABLEVIEW USING SCREEN 1000,
              TC_CONTROL1 TYPE TABLEVIEW USING SCREEN 1000.
    DATA:     G_TC_CONTROLS_LINES  LIKE SY-LOOPC,
              G_TC_CONTROLS_LINES1  LIKE SY-LOOPC.
    *&      Module  tc_control_get_lines  OUTPUT
          text
    MODULE tc_control_get_lines OUTPUT.
    g_tc_controls_lines = sy-loopc.
    move-corresponding it_data to wa_data.
    ENDMODULE.                 " tc_control_get_lines  OUTPUT
    MODULE tc_control_modify INPUT.
    move-corresponding wa_data to it_data.
    MODIFY it_data
        FROM wa_data
        INDEX tc_control-current_line.
    append it_data.
    clear it_data.
    ENDMODULE.                 " tc_control_modify  INPUT
    Please suggest me any clue.
    Thanks in advance
    vijay dwivedi

    Hi ,
    I have understood the problem.
    In your ABAP code replace all the occurrrences of wa_data  with the structurename.
    Use the TABLES keyword to declare the structure .That structure will be same as
    reference table of the table control .
    Here the structure is SPFLI.
    Check the bellow code , it will resolve the issue.
    ABAP code - -
    program  zsdn.
    tables spfli.  " Declare the structure
    data : it_data like table of spfli with header line,
    *wa_data TYPE spfli,  " commented
    w_i type i.
    *CONTROLS TC_CONTROL TYPE TABLEVIEW USING SCREEN 100.
    controls: tc_control type tableview using screen 1000,
    tc_control1 type tableview using screen 1000.
    data: g_tc_controls_lines like sy-loopc,
    g_tc_controls_lines1 like sy-loopc.
    module tc_control output.
      describe table it_data lines tc_control-lines.
    endmodule. " TC_CONTROL OUTPUT
    module tc_control_get_lines output.
      g_tc_controls_lines = sy-loopc.
      move-corresponding it_data to spfli.
    endmodule. " tc_control_get_lines OUTPUT
    module tc_control_modify input.
      move-corresponding spfli to it_data.
      modify it_data
      from spfli
      index tc_control-current_line.
      append it_data.
      clear it_data.
    endmodule. " tc_control_modify INPUT
    module status_0100 output.
      set pf-status 'STAT'.
    *  SET TITLEBAR 'xxx'.
    endmodule.                 " STATUS_0100  OUTPUT
    module user_command_0100 input.
      case sy-ucomm.
        when 'BACK' or 'EXIT' or 'CANCEL'.
          leave to screen 0.
      endcase.
    endmodule.                 " USER_COMMAND_0100  INPUT
    *&      Module  POPLATE_TABLE  OUTPUT
    *       text
    module poplate_table output.
      if it_data is initial.
        select * from spfli into table it_data.
      endif.
    endmodule.                 " POPLATE_TABLE  OUTPUT
    Screen code (Scr no 1000) - -
    PROCESS BEFORE OUTPUT.
      MODULE status_0100.
      MODULE poplate_table.
      MODULE tc_control.
      LOOP AT it_data WITH CONTROL tc_control CURSOR w_i.
        MODULE tc_control_get_lines.
      ENDLOOP.
    PROCESS AFTER INPUT.
      MODULE user_command_0100.
      LOOP AT it_data.
        MODULE tc_control_modify ON CHAIN-REQUEST.
    *    ENDCHAIN.
      ENDLOOP.
    Regards
    Pinaki

  • How to let the user define the colors for each plots in the graph (I use LabVIEW 7)?

    How to let the user define the colors for each plots in the graph (I
    use LabVIEW 7)?

    Hi,
    Take a look at this example, it uses property nodes to select tha
    active plot and then changes the color of that plot.
    If you want to make the number of plots dynamic you could use a for
    loop and an array of color boxes.
    I hope this helps.
    Regards,
    Juan Carlos
    N.I.
    Attachments:
    Changing_plot_color.vi ‏38 KB

  • Site Web Analytics - no usage data being generated

    Hello all:
    I have a SharePoint Foundation 2013 farm with 2 WFE - 1 Search Server and 1 DB server.  Search Service Application has been configured and functioning properly.  Usage and health Data Service Application has been created and started.  Usage
    data collection is enabled and the "Analytics Usage" check box is checked.  Usage Data Import and Usage Data Processing timer jobs are scheduled and run successfully.
    But, I still get the following error when I go to the Site Web Analytics "A web analytics report is not available for this site. Usage processing may be disabled on this server or the
    usage data for this site has not been processed yet."
    After doing some research, some folks have suggested the following which has to do with manually enabling the receivers via powershell - which I have done but still no report and same error. 
    http://geekswithblogs.net/bjackett/archive/2013/08/26/powershell-script-to-workaround-no-data-in-sharepoint-2013-usage.aspx
    Other Internet searches indicate that Web Analytics Reports is no longer available in SharePoint Foundation 2013:
    http://blogs.msdn.com/b/chandru/archive/2013/08/31/sharepoint-2013-web-analytics-report-where-is-it.aspx
    http://sharepoint.stackexchange.com/questions/63099/where-is-the-web-analytics-service-in-sharepoint-2013
    There is also a TechNet question which indicate that "Microsoft Support confirmed me there's a bug in SharePoint Foundation 2013 in the Database that's going to be fixed in the June or August CU"
    http://social.technet.microsoft.com/Forums/sharepoint/en-US/5372109c-8a6e-4d31-aa34-13b6cbde52cf/sharepoint-foundation-2013-web-analytics?forum=sharepointgeneral
    But, there is no resolution if this bug has been addressed or not.
    Therefore, I would really like to know what the deal is with this issue.  At the moment, I do not see any usage data being generated on any of the SharePoint Foundation servers in the farm.
    Please advise.
    Thank you,
    Rumi

    Hi Rumi,
    Find a same issue internaly which says that the links Site Web Analytics is no longer valid in SharePoint 2013 Foundation due to the changes in analytics service application architecture, so you may need the SharPoint enterprise edition for using
    this feature. 
    Symptom
    - Recently, we upgraded to SharePoint Foundation 2013 from WSS 3.0. In SharePoint Foundation 2013 sites, we see the option to click on Site Web Analytics reports but when we click on it, we get an error.
    - Clicking on Site Web Analytics reports from Site Settings \ Site Actions produces the error: “A web analytics report is not available for this site. Usage processing may be disabled on this server or the usage data for this site has not been processed yet.”
    - We have ensured we have logging enabled (multiple categories)
    - Example Site: http://sharepoint2/sites/IT/Projects/SAP/_layouts/15/usageDetails.aspx
    Cause
    By Design
    1) The links in Site Settings from a site collection are no longer valid in SharePoint 2013 (due to change in Analytics Service application architecture changes...part of Search Service now)
    2) SharePoint Foundation 2013 does not support Usage Reporting Analytics
    Resolution
    o Purchase a license for SharePoint Server 2013 Enterprise, and build out a farm for it (the Foundation SKU cannot be upgraded in-place to Server).
    o Once built up, you could copy your databases over and attach them to the Server farm and do your cutover.
    o Going forward from there, you would be able to have access to the Usage reports.
    Also as you have found that msdn blog with the explenation that it is not available in SPF 2013.
    http://blogs.msdn.com/b/chandru/archive/2013/08/31/sharepoint-2013-web-analytics-report-where-is-it.aspx
    http://technet.microsoft.com/en-us/library/jj819267.aspx#bkmk_FeaturesOnPremise
    Thanks,
    Daniel Yang
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected].
    Daniel Yang
    TechNet Community Support

  • What is the best way to graph CAN data?

    Hi All,
    Even after years of trying, I am still really lousy at using the LabVIEW graphing functions, so I hope you will be patient with me.
    I am currently writing code to monitor a CAN bus.  I have messages with five different arbitration IDs coming in at irregular time intervals.  Generally, there is between between 5ms and 100ms between packet arrival times.  My first currently captures the raw CAN data and parses it according to the format requirements for each arbitration ID and shows the corresponding values from the parsed data.   It also saves the raw data into a txt file.  Each entry saves a time stamp, Arb ID, message length and 8 CAN bytes, which is the length of each CAN packet.
    I have another program which takes the raw data from the original txt file and resaves it as formatted data, broken out into parsed values.  I use this two-step process to make my CAN capture program run faster.
    I have two graphing needs right now:
    1.  Graphing the ruasi-real-time values of the parsed CAN data as they are acquired in my CAN capture program.  This needs to happen in as little time as possible, giving me usable graphs or charts without bogging down the program.  If graphing the data takes up too much CPU time, I could graph data samples once every XXXms, instead of graphing everything that comes in.  If graphing the data proves too CPU intensive, I might just give up on this real time graphing.
    2.  Graphing the entire parsed data set in my second, post-capture program.  Speed is not as important in this program because I am not capturing real time data while it is running.  This graph needs to include each data point vs. its associated timestamp.
    Any recommendations on which graphing functions to use in these programs would be greatly appreciated.
    Thanks!

    I'm not sure what you mean by "graphing functions."  I have code running now that receives a CAN message every 1ms.  Every 100ms, all the data received in that period is added to a chart.  I'm using a less-expensive USB CAN card (so no on-board filtering) and my code has no problem filtering by arb id in software.  I'm doing this by grabbing all received messages from the buffer every 10ms and, in a for loop, checking the arbitration ID of each packet.  If the ID matches the one I want to graph, I convert the CAN packet to 4 16-bit values and put them in a queue.  In a separate loop, every 100ms I flush the queue and write the contents to the chart.  Here's the relevant bit of my code.  Does this help?

  • Three Graphs and Data need to display in a single screen

    Hi Gurus,
    I have a requirment that customer wants to see three graphs and data in a single screen.
    The data will be avilable in a single query, how can i display.  I gone through with many SDN blogs, but i did not get the solution.
    Requirment is:
    First graph         Business Unit informaiton, there are around 7 BUs, under each BU, they have 3-7 Industry groups.
    Second Graph:  Industry Group, under each industry group there are no of customers, i want to display top ten customers.
    Third Graph:  Top Ten Customers.

    Hi Karanam,
    Assuming you are using WAD;
    First graph Business Unit information, there are around 7 BUs, under each BU, they have 3-7 Industry groups.
    -You would need to have a Query that displays the BUs with their Industry Group count i.e BU in the Rows with Industry Count as the KF - I assume you want to show count here
    -Build a Data Provider DP1 on the Query
    -Drag a Chart webitem onto the web template & assign DP1 to it - use a Column/Bar Chart to display the Category 'BU' & Series 'Industry Count'
    Second Graph: Industry Group, under each industry group there are no of customers, i want to display top ten customers.
    -You need to have a Query that displays the Industry Groups & top 10 Customers within each i.e.  - create a Query Condition to achieve top 10 Customers based on some criteria - I assume Sales Revenue or likewise
    -Build a Data Provider DP2 on the Query
    -Drag a Chart webitem onto the web template & assign DP2 to it - use a Column/Bar Chart to display the Categories 'Industry Group', 'Customer' & Series 'Sales Revenue' or likewise
    Third Graph: Top Ten Customers.
    -You need to have a Query that displays the top 10 Customers i.e.  - create a Query Condition to achieve top 10 Customers based on some criteria - I assume Sales Revenue or likewise
    -Build a Data Provider DP3 on the Query
    -Drag a Chart webitem onto the web template & assign DP3 to it - use a Column/Bar Chart to display the Category 'Customer' & Series 'Sales Revenue' or likewise
    --Priya
    Edited by: Priya Jacob on May 27, 2010 7:41 AM

Maybe you are looking for