1. #1
    Sencha User Daniil's Avatar
    Join Date
    Jun 2010
    Location
    Saint-Petersburg, Russia
    Posts
    975
    Vote Rating
    111
    Daniil is a name known to all Daniil is a name known to all Daniil is a name known to all Daniil is a name known to all Daniil is a name known to all Daniil is a name known to all

      0  

    Default Any solution to get a discrete LineSeries (or something other), i.e. with gaps?

    Any solution to get a discrete LineSeries (or something other), i.e. with gaps?


    Hi,

    What if I need a gap within a LineSeries?

    I think LineSeries cannot be discrete. So, I am just asking - is there any solution? Sure, apart from two LineSeries for one gap, three LineSeries for two gaps, etc. I need just one Series, but with gaps.

  2. #2
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    9,111
    Vote Rating
    470
    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


    You can specify values of 'undefined' to halt the drawing of a line.

    Scott.

  3. #3
    Sencha User Daniil's Avatar
    Join Date
    Jun 2010
    Location
    Saint-Petersburg, Russia
    Posts
    975
    Vote Rating
    111
    Daniil is a name known to all Daniil is a name known to all Daniil is a name known to all Daniil is a name known to all Daniil is a name known to all Daniil is a name known to all

      1  

    Default


    Hi Scott,

    Thanks a lot for the answer.

    Previously I tried with nulls. But, anyways, I am not sure where I should specify 'undefined' to get a required gap.

    Please look at the screenshot. I need a gap between 25 and 75.
    2.JPG
    Here is a test case. Could you clarify, please, where should I specify 'undefined' to get a gap between 25 and 75?

    Test Case
    Code:
    <html>
    <head>
        <title>Chart Gaps</title>
    
        <link type="text/css" rel="stylesheet" href="../resources/css/ext-all.css" />
    
        <script type="text/javascript" src="../ext-all-debug.js"></script>
    
        <script type="text/javascript">
            Ext.onReady(function () {
                Ext.create("Ext.chart.Chart", {
                    renderTo: Ext.getBody(),
                    height: 400,
                    width: 400,
                    axes: [{
                        position: "bottom",
                        title: "X",
                        fields: ["x"],
                        type: "Numeric"
                    }, {
                        position: "left",
                        title: "Y",
                        fields: ["y"],
                        type: "Numeric"
                    }],
                    series: [{
                        title: "LineSeries",
                        xField: "x",
                        yField: "y",
                        type: "line"
                    }],
                    store: {
                        fields: [{
                            name: "x"
                        }, {
                            name: "y"
                        }],
                        autoLoad: true,
                        proxy: {
                            data: [{
                                "x": 0,
                                "y": 0
                            }, {
                                "x": 25,
                                "y": 25
                            }, {
                                "x": 50,
                                "y": undefined /* Where should I specify 'undefined' to get a gap between 25 and 75? */
                            }, {
                                "x": 75,
                                "y": 75
                            }, {
                                "x": 100,
                                "y": 100
                            }],
                            type: 'memory'
                        }
                    }
                });
            });
        </script>
    </head>
    <body>
    
    </body>
    </html>

  4. #4
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    9,111
    Vote Rating
    470
    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

      1  

    Default


    My mistake.. It seems that undefined only works if it is at the end as shown:
    http://www.sencha.com/forum/showthread.php?233162

    If the values are in the middle, the markers are omitted and the line continues.

    You would most likely need to override or create a new series. I see there is a bug report for this:
    http://www.sencha.com/forum/showthread.php?179292

    It is slated for 4.2 release (no public date)

    Regards,
    Scott.

  5. #5
    Sencha User Daniil's Avatar
    Join Date
    Jun 2010
    Location
    Saint-Petersburg, Russia
    Posts
    975
    Vote Rating
    111
    Daniil is a name known to all Daniil is a name known to all Daniil is a name known to all Daniil is a name known to all Daniil is a name known to all Daniil is a name known to all

      0  

    Default


    Great, thanks for the information!

  6. #6
    Sencha User Daniil's Avatar
    Join Date
    Jun 2010
    Location
    Saint-Petersburg, Russia
    Posts
    975
    Vote Rating
    111
    Daniil is a name known to all Daniil is a name known to all Daniil is a name known to all Daniil is a name known to all Daniil is a name known to all Daniil is a name known to all

      1  

    Default


    Quote Originally Posted by scottmartin View Post
    You can specify values of 'undefined' to halt the drawing of a line.
    Hi Scott,

    What about to have the same behavior for nulls? The nulls come from a server. Then we could avoid setting up a convert handler to get undefined instead of nulls.
    Ext.NET - ASP.NET for Ext JS
    MVC and WebForms
    Examples | Twitter

  7. #7
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    9,111
    Vote Rating
    470
    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


    This is slated for 4.2. I have noted that you would like to have null as an option.

    Scott.

  8. #8
    Sencha User Daniil's Avatar
    Join Date
    Jun 2010
    Location
    Saint-Petersburg, Russia
    Posts
    975
    Vote Rating
    111
    Daniil is a name known to all Daniil is a name known to all Daniil is a name known to all Daniil is a name known to all Daniil is a name known to all Daniil is a name known to all

      0  

    Default


    Thank you very much, Scott.
    Ext.NET - ASP.NET for Ext JS
    MVC and WebForms
    Examples | Twitter

  9. #9
    Sencha User Daniil's Avatar
    Join Date
    Jun 2010
    Location
    Saint-Petersburg, Russia
    Posts
    975
    Vote Rating
    111
    Daniil is a name known to all Daniil is a name known to all Daniil is a name known to all Daniil is a name known to all Daniil is a name known to all Daniil is a name known to all

      0  

    Default


    Hi Scott,

    Re: LineSeries with gaps

    Someone found out that "false" as a value produces a gap. Here are more details and a working sample.
    http://www.sencha.com/forum/showthre...l=1#post920507
    Ext.NET - ASP.NET for Ext JS
    MVC and WebForms
    Examples | Twitter

  10. #10
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    9,111
    Vote Rating
    470
    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


    Good to know. Thanks for the heads up!

    Scott.

Thread Participants: 2