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
1300
Infragistics().DataChart
posted

Hello,

I am using Infragistics().DataChart in my application.

Currently the chart is displaying gridlines both horizontally and vertically.

But I need to remove horizontal grid lines and also need to customize "NumericY" Label format.

i.e. "$" dollar format before values in Numeric y axis.

Also need to display series tool tip values dynamically.

So please provide me solution and also send me sufficient examples regarding "Html.Infragistics().DataChart"

My code is given below.

@(Html.Infragistics().DataChart(Model.DisbursedFunds.AsQueryable())
                .ID("chart")
                .Width("900px")
                .Height("550px")
                //.GridMode(GridMode.None)             
                .Axes(axis =>
                    {                                         
                        axis.CategoryX("MonthName").Label(item => item.MonthName).LabelLocation(AxisLabelsLocation.OutsideBottom).Interval(1).LabelLocation(AxisLabelsLocation.OutsideBottom).MinorStrokeThickness(1);
                        axis.NumericY("TotalSum").MinimumValue(0).MaximumValue(5000000).LabelLocation(AxisLabelsLocation.OutsideLeft);
                        axis.NumericY("TotalLoans").MinimumValue(0).MaximumValue(100).StrokeThickness(10).LabelLocation(AxisLabelsLocation.OutsideRight);
                    }

                )
                .Series(series =>
                    {
                        series.Column("Sum").Title("New Loans").Brush("#87AB3D").ShowTooltip(true).TooltipTemplate("Sum")
                        .XAxis("MonthName").YAxis("TotalSum").ValueMemberPath(item => item.Sum)
                        .Legend(legend => legend.ID("legend")).ShowTooltip(true).TooltipTemplate("Total Loans funded").ShowTooltip(true);
                     

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

Thanks

Parents Reply Children
No Data