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 ??
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
Thanks Graham, how about Axes titles.
How can I give title to X-axis and Y-axis ??
For ex. If I want to show what the axes represents.
Currently there is no built in axis titling. You could make a feature request, or you can place DOM elements around the chart to indicate labels for the axes. Another thing you can do is set the color of the axes and then indicate what each color represents in a legend.
labelLocation controls where the labels display, here are the possible settings:
outsideTop type="string" the labels should have an outside top position.
outsideBottom type="string" the labels should have an outside bottom position.
outsideLeft type="string" the labels should have an outside left position.
outsideRight type="string" the labels should have an outside right position.
insideTop type="string" the labels should have an insid top position.
insideBottom type="string" the labels should have an inside bottom position.
insideLeft type="string" the labels should have an inside left position.
insideRight type="string" the labels should have an inside right position.
Please note that some of the settings only apply to some of the axes. And if you are setting inside positions then this works together with crossingAxis and crossingValue for you to select where the axis should be positioned in terms of the other axis.
If you are actually asking about text alignment, however, I'm afraid text alignment settings didn't make it into v1, so I invite you to make a feature request to make sure this is correctly prioritized for the coming releases.
BTW, is there any build in property to set axis position instead of keeping them left. I know we can set "Extent", but I haven't find any property to set position or placement.