1. #1
    Sencha User
    Join Date
    Jan 2012
    Posts
    5
    Vote Rating
    0
    gnabhan is on a distinguished road

      0  

    Default Unanswered: Vertical line for current date In Extjs line chart

    Unanswered: Vertical line for current date In Extjs line chart


    chart.jpg


    How to set vertical line for current date looks like chart image. Please update me

  2. #2
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    9,154
    Vote Rating
    475
    Answers
    686
    scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future

      0  

    Default


    Have a look at the following:
    http://www.sencha.com/forum/showthread.php?236137

    Scott.

  3. #3
    Sencha User
    Join Date
    Jan 2012
    Posts
    5
    Vote Rating
    0
    gnabhan is on a distinguished road

      0  

    Default Couldn't access about url

    Couldn't access about url


    If click above link then showing following message,

    gnabhan, you do not have permission to access this page. This could be due to one of several reasons:

    1. Your user account may not have sufficient privileges to access this page. Are you trying to edit someone else's post, access administrative features or some other privileged system?
    2. If you are trying to post, the administrator may have disabled your account, or it may be awaiting activation.
    Please tell me how to see your thread

  4. #4
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    9,154
    Vote Rating
    475
    Answers
    686
    scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future

      0  

    Default


    The thread is for premium member support. Please try:
    http://jsfiddle.net/h58BZ/

    Scott.

  5. #5
    Sencha User
    Join Date
    Jan 2012
    Posts
    5
    Vote Rating
    0
    gnabhan is on a distinguished road

      0  

    Default


    Thanks for your reply. I'm new to extjs chart. I want to show only vertical line for current date from X-axis. Please refer below attached image.
    chart.jpg

  6. #6
    Sencha User
    Join Date
    Jan 2012
    Posts
    5
    Vote Rating
    0
    gnabhan is on a distinguished road

      0  

    Default


    Hello,

    I'm new to Extjs. Above you mentioned example had horizontal bar for Y-axis. But I want to display vertical bar based on X-axis value. Can you guide me to display vertical bar for current date or give any functions or sample demo url.

  7. #7
    Sencha User
    Join Date
    Jan 2012
    Posts
    1
    Vote Rating
    0
    andyjc is on a distinguished road

      0  

    Default


    I would find this very useful too. Did you find any way to do this?

    Thanks,

    Andy

  8. #8
    Sencha User
    Join Date
    Aug 2013
    Posts
    6
    Vote Rating
    1
    wared is on a distinguished road

      0  

    Default Works for me.

    Works for me.


    Try to add this event handler to your series config :

    Code:
    afterrender: function () {
        var c = this.chart,
            yAxis = c.axes.items[0],
            xAxis = c.axes.items[1];
        x = xAxis.x + Math.floor(xAxis.length * 30 / xAxis.to) + 1;
        c.surface.add({
            'type': 'path',
            'stroke': '#f00',
            'stroke-width': 1,
            'path': [
                'M' + x + ' ' + yAxis.y,
                'V' + (yAxis.y - yAxis.length + 2) + ' Z'
            ].join(' ')
        }).show(true);
        return this.callParent(arguments);
    }
    Replace "30" with the x value where you want to position the line.

    I started from there : http://stackoverflow.com/questions/1...js4-line-chart.

  9. #9
    Sencha User
    Join Date
    Mar 2013
    Location
    Austin, TX
    Posts
    4
    Vote Rating
    0
    tanzir is on a distinguished road

      0  

    Default


    It didn't work for me. I'm using ExtJS line examples - http://docs.sencha.com/extjs/4.1.3/e...arts/Line.html. Wanted to show the same line what gnabhan was saying. I tried both the above example and the one on stackoverflow. Didn't work for me.

    Any information will be highly appreciated.


    Thanks