Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
690
How igDataChart reacts with tactil interface
posted

Hi, I'm testing the igDataChart on my mobile (Android 2.3.6 (on Opera, FireFox and the native browser)) and I see that I can't drag/move the window when I interact with the chart.

Is there a property that allow this ?

There is the DefaultInteraction attribut but that not seems to work...

<%= Html.Infragistics().DataChart<Mesure>(Model)
            .ID("chart")
                .Width("320px")
                .Height("500px")
            .Legend(legend => legend.LegendType(LegendType.Legend).ID("legend1"))
            .VerticalZoomable(false)
            .HorizontalZoomable(false)
            .DefaultInteraction(InteractionState.DragPan)
            .Axes(axes =>
            {
                axes.CategoryX("xAxis").
                    Label(item => item.Annee);
                    //.LabelTextColor("white").LabelLocation(AxisLabelsLocation.InsideTop);
                    //.Stroke("blue").MajorStroke("blue"); //Grille
                    //.Strip("blue");//bgcolor une stroke sur deux.
                axes.NumericY("yAxis");
                    //.LabelTextColor("white").LabelLocation(AxisLabelsLocation.InsideLeft);
                    //.Stroke("blue").MajorStroke("blue"); //Grille;
            })
            .Series(series =>
            {
                series
                    .Line("Classement")
                    .XAxis("xAxis").YAxis("yAxis")
                    .ValueMemberPath(item => item.Classement)
                    .Title("Classement")
                    .ShowTooltip(true)
                    .TooltipTemplate("InfoBulleChart")
                    //.Brush("lime")
                    .Thickness(2);
                //series ...
            })
            //.PlotAreaBackground("black")
            .DataBind()
            .Render()
        %>

 

 

Thanks in advance.

Jérôme.

  • 30692
    Suggested Answer
    Offline posted

    Hi,

    You have set VerticalZoomable and HorizontalZoomable to false in the above. If these are false then the chart will not react to zoom and pan requests from the user. Do you have modernizr referenced on that page? Some of the chart's mobile interactions (for example the overview pane) don't get enabled unless modernizr detects a touch environment.

    DefaultInteraction defines whether your mouse or touch input will pan the view by default, or draw the zoom rectangle. When the chart detects a touch environment this will default to dragPan. We don't support a pinch/zoom gesture in android in v1 (it is supported in iOS, though), from what I recall. But you can pan, and you can zoom the chart by either double tapping the chart, or via the use of the overview pane, which is enabled by setting OverviewPlusDetailPaneVisible to visible.

    Please note, that the overview pane will not be configured for proper use in a touch environment unless the chart is in touch mode. If you have modernizr referenced, this should be the case.

    -Graham