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
135
DataChart not Displaying Data Points
posted

Hello,

I am wanting to plot simple sales quantity by week which I have done with the window forms chart controls.
I am now wanting to do this with the web controls. My VS project is an ASP.NET MVC using Razor project.

Y Axis is Quantity
X Axis is Week
Would Like to display the event name and product name in the chart some how.


I have copied off some of the examples from the website but my data will not plot on the chart. I am providing a screen capture of current output and also the data and code. Would appreciate any help. Thanks!

Existing Code including commented out code

                @(Html.Infragistics().DataChart<eMerchantSystem.Orders.Reports.Models.OrderWeeklySale>()
                        .ID("uicEvents")
                        .Width("100%")
                        .AlignsGridLinesToPixels(true)
                        .Height("400px")
                        .Width("800px")
                        .VerticalZoomable(true)
                        .HorizontalZoomable(true)
                        .Legend(legend => legend.ID("legend"))
                        .OverviewPlusDetailPaneVisibility(Visibility.Collapsed)
                        .Title("Weekley Sales")

                        .Axes(axis =>
                        {
                            axis.CategoryX("Week").Label(item => item.Week).LabelLocation(AxisLabelsLocation.OutsideBottom).Interval(1).LabelLocation(AxisLabelsLocation.OutsideBottom).MinorStrokeThickness(1);
                            axis.NumericY("Quantity").MinimumValue(0).MaximumValue(500).LabelLocation(AxisLabelsLocation.OutsideLeft);
                            //axis.NumericY("TotalLoans").MinimumValue(0).MaximumValue(100).StrokeThickness(10).LabelLocation(AxisLabelsLocation.OutsideRight);

                            axis.CategoryX("xAxis").Title("Week").Label(item => item.Week);
                            axis.NumericY("yAxis").Title("Quantity").Label(item => item.Quantity);
                        })

                        //.Series(series =>
                        //{
                        //    series.Column("Sum").Title("Sales").Brush("#87AB3D").ShowTooltip(true).TooltipTemplate("Sum")
                        //    .XAxis("Week").YAxis("Quantity").ValueMemberPath(item => item.Quantity)
                        //    .Legend(legend => legend.ID("legend")).ShowTooltip(true).TooltipTemplate("Total Sales by Week").ShowTooltip(true);

                        //    //series.Spline("total").Title("Total Sales")
                        //    //.XAxis("MonthName").YAxis("TotalLoans").Thickness(3).ValueMemberPath(item => item.Total)
                        //    //.Legend(legend => legend.ID("legend2")).ShowTooltip(true).TooltipTemplate("Number of Loans");

                        //})

                        .Series(series =>
                        {
                            series.Line("series1")
                            .ValueMemberPath(item => item.Quantity)
                            .Title("Quantity")
                            .XAxis("xAxis")
                            .YAxis("yAxis")
                            .ShowTooltip(true);

                            //series.Line("series2")
                            //.ValueMemberPath(item => item.ItemTotal)
                            //.Title("Upper Limit")
                            //.XAxis("xAxis")
                            //.YAxis("yAxis")
                            //.ShowTooltip(false);
                        })

                        .DataBind()
                        .Render()
                )


Data:

EventName ProductName Week Quantity Total
Event 1 General Admission Ticket 46 1 31.2
Event 1 General Admission Ticket 47 165 5148
Event 1 General Admission Ticket 48 36 1123.2

Current Rending of Chart

Do data points are showing.. Please advise. Thanks again!