1. #1
    Sencha User
    Join Date
    Aug 2009
    Posts
    12
    Vote Rating
    0
    bsautner is on a distinguished road

      0  

    Default Time Series Chart

    Time Series Chart


    I'm having a really hard time getting a time sieries line chart to display right. Take the two time series below, i'd like to get a chart with a timestamp x axis showing markers at hour intervals with two lines showing each y axis with markers on the values.

    Series 1
    X Axis Y Axis
    1/1/2000 10:00 AM 3.14
    1/1/2000 11:00 AM 2.20
    1/1/2000 11:30 AM 8.24

    Series 2
    X Axis Y Axis
    1/1/2000 10:15 AM 7.44
    1/1/2000 11:20 AM 3.66
    1/1/2000 11:45 AM 2.26

    it seems like a simple problem but the line charts can't seem to do it. If i add an x axis with these lables:
    String[] dates = {
    "1/1/2000 10:00:00 AM",
    "1/1/2000 11:00:00 AM",
    "1/1/2000 12:00:00 PM"
    };
    xa.setLabels(dates);

    i can't add a point at 11:20 AM.... any help? I just want a time series scatter plot with connecting lines smart enough to handle dates as an x axis...

  2. #2
    Sencha User
    Join Date
    Dec 2007
    Posts
    38
    Vote Rating
    0
    Nils-Fredrik is on a distinguished road

      0  

    Default


    I have a problem actually understandig what you want to achieve? Could you post your code?

  3. #3
    Ext User
    Join Date
    Apr 2009
    Posts
    1
    Vote Rating
    0
    elkouti is on a distinguished road

      0  

    Default Time Series Chart

    Time Series Chart


    Hi bsautner,

    Did you found a solution for this ?

    I'm trying to do the same, have a time series chart. Time in the X and value on the Y with the correct scale and adjustment.

    regards

  4. #4
    Sencha User
    Join Date
    Dec 2007
    Posts
    38
    Vote Rating
    0
    Nils-Fredrik is on a distinguished road

      0  

    Default


    Any sample code?

  5. #5
    Ext User
    Join Date
    Jul 2009
    Posts
    12
    Vote Rating
    0
    maniac is on a distinguished road

      0  

    Default


    I'm not sure why code is needed here. He wants a time series chart and wants the chart module to handle that smartly. If the difference between two points is 60 minutes, the visual distance on the displayed x axis should be twice as large as if the point difference was 30 minutes.

    For the record: I don't think that's possible with OFC, and I really, really would appreciate if I would be wrong I would need such a feature as well.

  6. #6
    Sencha User
    Join Date
    Aug 2009
    Posts
    12
    Vote Rating
    0
    bsautner is on a distinguished road

      0  

    Default time series

    time series


    Thanks for the replies - i was actually still trying to figure this out when i stumbled upon my original old post. maniac is right, i'm trying to build a chart where i have a collection of double/date - let's say i have these values to trend in a chart

    value timestamp
    5.5 1/1/2009 8:00 AM
    6.5 1/1/2009 8:05 AM
    3.2 1/1/2009 8:25 AM
    4.4 1/1/2009 9:00 AM
    8.3 1/1/2009 9:32 AM

    none of the chart sample codes seems to adress what should be a basic need. Dates on X, Value on Y and smart enough to give me ticks on regulare date intervals (say 8AM to 10AM) with ticks every 30 minutes and markers on my values.



  7. #7
    Sencha User
    Join Date
    Aug 2009
    Posts
    12
    Vote Rating
    0
    bsautner is on a distinguished road

      0  

    Exclamation time series

    time series




    it just seems like the chart examples let you do a line chart with a value at each marker which isn't realistic for a time series where markers are at regular intervals but values are somewhere in between - how would i add an X and Y Axis and data to get myself close to creating a chart like this one

    http://www.google.com/finance?client=ig&q=goog

    just changing time series values over a date range of markers...


    If we need sample code - take this right from the chart galery area chart example where it puts values on Month markers, how would i add a value in between march and april?? obviously this example would understand it becuse the collections need a value at each X marker....

    class AreaChartExample implements ChartModelExample {
    public ChartModel getChartModel(int segments) {
    ChartModel cm = new ChartModel("Growth per Region",
    "font-size: 14px; font-family: Verdana;");
    cm.setBackgroundColour("#ffffff");
    XAxis xa = new XAxis();
    xa.setLabels("J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D");
    cm.setXAxis(xa);
    AreaChart area1 = new AreaChart();
    area1.setFillAlpha(0.3f);
    area1.setColour("#ff0000");
    area1.setFillColour("#ff0000");
    for (int n = 0; n < 12; n++) {
    if (n % 3 != 0)
    area1.addNullValue();
    else
    area1.addValues(n * Random.nextDouble());
    }
    cm.addChartConfig(area1);
    AreaChart area2 = new AreaChart();
    area2.setFillAlpha(0.3f);
    area2.setColour("#00aa00");
    area2.setFillColour("#00aa00");
    int floor = Random.nextInt(3);
    double grade = (Random.nextInt(4) + 1) / 10.0;
    for (int n = 0; n < 12; n++) {
    if (n % 2 != 0)
    area2.addNullValue();
    else
    area2.addValues(n * grade + floor);
    }
    cm.addChartConfig(area2);
    return cm;

    }
    }
    Last edited by bsautner; 26 Oct 2009 at 7:38 AM. Reason: providing code

  8. #8
    Ext User Franzen's Avatar
    Join Date
    Dec 2009
    Posts
    20
    Vote Rating
    0
    Franzen is on a distinguished road

      0  

    Default


    Did anyone come up with a solution for this?

  9. #9
    Sencha User
    Join Date
    Aug 2009
    Posts
    12
    Vote Rating
    0
    bsautner is on a distinguished road

      0  

    Default time series chart

    time series chart


    I ended up using the Google Visualization API for GWT - the time series chart they have is the same as the one on Google finance, it's really slick. You can see the chart on my Nimbits data logger web site: http://www.nimbits.com. Hope that helps

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar