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
1730
Axes title not coming
posted

Hi,

I am rendering multiple charts in a loop. Chart isrendering properly one below the other, but the TITLE is not coming.

 @(Html.Infragistics().DataChart()
                    .Height("150px")

                    .Width("900px")
                    .BottomMargin(10)
                    .TopMargin(10)
                    .VerticalZoomable(true)
                    .HorizontalZoomable(true)
                    .Axes((axes) =>
                    {
                        axes.NumericX("xAxis");
                        axes.NumericY("yAxis");
                    })
                    .Series(series =>
                    {
                        series.Scatter("scatterSeries" + j.ToString(), dataSeriesCollection[j].AsQueryable())
                            .XAxis("xAxis").YAxis("yAxis")
                            .XMemberPath(dataPoint => dataPoint.X)
                            .YMemberPath(dataPoint => dataPoint.Y)
                            .Title("Series Title");

                        series.Scatter("scatterSeries" + (j + 1).ToString(), dataSeriesCollection[j + 1].AsQueryable())
                            .XAxis("xAxis").YAxis("yAxis")
                            .XMemberPath(dataPoint => dataPoint.X)
                            .YMemberPath(dataPoint => dataPoint.Y)
                            .Title("Series Title");
                       
                    })
                    .DataBind()
                    .Render()
                )

 Is there any additional settings that needs to be done ??

Also is there any way to set Chart Title ??

Parents
No Data
Reply
  • 30692
    Verified Answer
    Offline posted

    A series title shows up in the legend, and doesn't represent a title for the chart as a whole. There isn't a dedicated property for a chart level title in the present version. I'd recommend making a feature request.

    But this is also easily achievable by putting a DOM container around the chart container and a span to represent the title. You can turn off the default border that you get around the chart container by modifying the chart's css.

    -Graham

Children