Results 1 to 5 of 5

Thread: Presenting time series of events

  1. #1
    Ext Premium Member yyogev's Avatar
    Join Date
    Jun 2009
    Location
    Shoham, Israel
    Posts
    196

    Question Presenting time series of events

    Hi,

    I want to draw a project time line using an ExtJS chart. My Data is a series of (day,description) points, each representing some project milestone, sorted by day (date).
    Ideally, I would like to have this displayed as a line of events, all in the same Y level, with day as X axis.

    The main problem: how to display a constant label, and not just the data tip, near each marker (point) ?

    The only thing close to this that I was able to find this far is the data tip, but it shows only when hovering over the marker, while I would like the labels to be shown constantly.
    I looked for a solution to this high and low, and the only thing I found that solves this is the highcharts library (http://www.highcharts.com/demo/?exam...els&theme=grid).

    So far I managed to show this a a two dimensional line chart, with X a time axis using day and Y a category axis using the milestones descriptions. However, this is not what I really want. With that I am having yet another problem: the spacing between categories is too big, and labelSpacing doesn't seem to have any effect.
    deliveries.png

    I will attach the relevant code in a separate post

    Any ideas will be welcome.

    Thanks,
    Yaron Yogev

    IT Software Developer

  2. #2
    Ext Premium Member yyogev's Avatar
    Join Date
    Jun 2009
    Location
    Shoham, Israel
    Posts
    196

    Default

    The chart code:
    Code:
        
    deliveries_chart = new Ext.chart.LineChart({
            id: "deliveries_chart",
            height: 235,
            width: 580,
            hidden: true,
            store: store,
            yField: "description",
            xField: "day",
            xAxis: new Ext.chart.TimeAxis({
                displayName: "Date",
                hideOverlappingLabels: true,
                labelFunction: "format_date"
            }),
            yAxis: new Ext.chart.CategoryAxis(),
            extraStyle: {yAxis: {labelSpacing: 2}}
        });
    Relevant code from the store (I use some utility function to create the actual store, as part of the grid seen in the picture below the chart):
    Code:
            fields:
            [
                {name: "id", type: "int"}, /* for identification only */
                {name: "day", type: "date", type: "date",
                 dateFormat: mysql_date_format_short},
                "description"
            ],
            sortInfo: {field: "day", direction: "ASC"}
    Yaron Yogev

    IT Software Developer

  3. #3
    Sencha User Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,245

    Default

    You are looking for annotations.

    This isn't supported by the YUI Chart swf, but there is a code fork that does.

  4. #4
    Ext Premium Member yyogev's Avatar
    Join Date
    Jun 2009
    Location
    Shoham, Israel
    Posts
    196

    Default

    Thanks, that looks like like what I've been looking for.
    Yaron Yogev

    IT Software Developer

  5. #5
    Sencha Premium User mankz's Avatar
    Join Date
    Nov 2007
    Location
    Stockholm, Sweden
    Posts
    3,153

    Default

    Shameless plug: Check out the Ext Scheduler, definitely has support for showing data in a timeline fashion.

    http://ext-scheduler.com/examples.html

Similar Threads

  1. Adding series to chart dynamically
    By Thomas Triplet in forum Ext 3.x: Help & Discussion
    Replies: 1
    Last Post: 3 Apr 2010, 4:56 PM
  2. Time Series Chart
    By bsautner in forum Ext GWT: Discussion
    Replies: 8
    Last Post: 30 Mar 2010, 6:58 AM
  3. Chart Series refresh - best way?
    By Copernicus in forum Ext 3.x: Help & Discussion
    Replies: 2
    Last Post: 15 Aug 2009, 2:36 AM
  4. Chart Series
    By a.ti in forum Ext 3.x: Help & Discussion
    Replies: 0
    Last Post: 25 Jun 2009, 7:39 AM
  5. presenting html response text
    By tirams in forum Ext 1.x: Help & Discussion
    Replies: 1
    Last Post: 10 Jul 2007, 9:47 AM

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
  •