[OPEN] [#930] [3.2.1] VerticalMarker plugin issue

  1. #1

    [OPEN] [#930] [3.2.1] VerticalMarker plugin issue

    Hello,

    It seems that the VericalMarker plugin doesn't work. Example below:

    @using Ext.Net;
    @using Ext.Net.MVC;
    
    @{
        Layout = null;
        
        var X = Html.X();
    }
    
    @functions
    {
        private IEnumerable<object> GetData()
        {
            return new List<object>
            {
                new { X = 1, Y = 1 },
                new { X = 2, Y = 2 },
                new { X = 3, Y = 2 },
                new { X = 3, Y = 3 }
            };
        }
    }
    
    <!DOCTYPE html>
    
    <html>
    <head>
        <title>Test</title>
    </head>
    <body>
        @(Html.X().ResourceManager().Theme(Theme.CrispTouch))
    
    @(X.Panel()
        .Layout("fit")
        .Width(500)
        .Height(500)
        .Items(
            X.CartesianChart()
                .Interactions(X.ItemHighlightInteraction())
                .Store(X.Store()
                    .Fields(
                        X.ModelField().Name("X"),
                        X.ModelField().Name("Y")
                    )
                    .Data(GetData())
                )
                .Axes(
                    X.NumericAxis()
                        .Position(Position.Left)
                        .Fields("Y")
                        .Grid(true),
    
                     X.CategoryAxis()
                         .Position(Position.Bottom)
                         .Fields("X")
                         .Grid(true)
                )
                .Series(
                    X.LineSeries()
                        .XField("X")
                        .YField("Y")
                        .Marker(X.CircleSprite().Radius(4))
                        .HighlightConfig(X.CircleSprite())
                )
                .Plugins(
                    X.VerticalMarker().Snap(true).ShowXLabel(false)
                )
        )
    )
    
    
    </body>
    </html>
    Last edited by Daniil; Oct 29, 2015 at 1:56 PM. Reason: [OPEN] [#930] [3.2.1]
  2. #2
    Hi @Yury,

    Thank you for the report!

    This stops a VerticalMarker plugin working:
    .Interactions(X.ItemHighlightInteraction())
    Created an Issue:
    https://github.com/extnet/Ext.NET/issues/930
  3. #3
    Thank you, Daniil.

    I've found one more bug. If series has ChartTip, VerticalMarker doesn't work too.
  4. #4
    Thanks!

    A ChartTip adds a ItemHighlightInteraction internally. Here is a related Sencha forum thread:
    https://www.sencha.com/forum/showthread.php?294942

    For some reason the ItemHighlightInteraction's onMouseMoveGesture function returns false.
    http://docs.sencha.com/extjs/5.1/5.1...useMoveGesture

    It prevents the VerticalMarker's events handlers to be executed.

    This seems help to get ItemHighlightInteraction and VerticalMarker working together.
    Ext.chart.interactions.ItemHighlight.override({
        onMouseMoveGesture: function () {
            var ret = this.callParent(arguments);
    
            return true;
        }
    });
    Though, I don't know the reason why it returns false initially and if changing it to true breaks something.

    Also it doesn't get a ChartTip working with a VerticalMarker. A tip appears, but in a wrong position.

Similar Threads

  1. Replies: 1
    Last Post: Aug 21, 2015, 3:53 PM
  2. [CLOSED] fireEvent issue in plugin
    By multimediait in forum 2.x Legacy Premium Help
    Replies: 2
    Last Post: May 20, 2014, 10:15 AM
  3. [CLOSED] VerticalMarker in behind code
    By cwolcott in forum 2.x Legacy Premium Help
    Replies: 6
    Last Post: Jun 15, 2013, 12:02 AM
  4. [CLOSED] GroupingSummary plugin issue
    By bakardi in forum 1.x Legacy Premium Help
    Replies: 6
    Last Post: Nov 18, 2011, 7:18 PM
  5. [CLOSED] 1.0 Plugin Upgrade issue
    By randy85253 in forum 1.x Legacy Premium Help
    Replies: 4
    Last Post: Oct 30, 2009, 12:14 PM

Posting Permissions