This is a migrated thread and some comments may be shown as answers.

Xaxis and y axis title not visible in UI.

2 Answers 476 Views
Charts
This is a migrated thread and some comments may be shown as answers.
Isha
Top achievements
Rank 1
Isha asked on 15 Jun 2016, 09:32 AM

Hi Team,

I am using the HTML Kendo chart in one of my UI. I am using the scatter and scatter line type for the same. As I need to show the data with its best fit regression line.

I am not able see the x axis and y axis title in my chart.

Attached is the image of my chart.

<%= Html.Kendo().Chart<PRT.Web.Models.QualityOverTimeViewModel>()
.Name("BestFitGraphWarm")
.Series(series =>
{
series.Scatter(
model => model.xaxis,
model => model.yaxis
)
.Labels(labels => labels.Background("transparent").Visible(false));
})
.Series(series =>
{
series.ScatterLine(
model => model.estXFieldName,
model => model.estYFieldName
);
})
.CategoryAxis(axis => axis
.Title(title => title.Text("Time"))
.Categories(model => model.Label )
.MajorGridLines(lines => lines.Visible(false))
.Line(line => line.Visible(false))
)
.ValueAxis(axis => axis.Numeric()
.Title(title => title.Text("Warm"))
.MajorGridLines(lines => lines.Visible(false))
.Line(line => line.Visible(false))
.Max(100)
.Min(0)
)
.Title(title => title.Text("Bivariate Fit of Warm Germ Test% By Time(Days After Harvest)"))
.Legend(legend => legend
.Position(ChartLegendPosition.Bottom))
.Tooltip(true)
.DataSource(dataSource => dataSource
.Read(read => read.Action("GetRegressionWarmChartData", "Visualize"))
)
%>

2 Answers, 1 is accepted

Sort by
0
Iliana Dyankova
Telerik team
answered on 17 Jun 2016, 07:39 AM
Hi Isha,

When using Scatter Charts you should use xAxis / yAxis not categoryAxis / valueAxis (documentation link). I.e. the following configuration should work: 
//....
.XAxis(axis => axis.Numeric().Title("Time"))
.YAxis(axis => axis.Numeric().Title("Warm"))


Regards,
Iliana Nikolova
Telerik
 
Get started with Kendo UI in days. Online training courses help you quickly implement components into your apps.
 
0
Isha
Top achievements
Rank 1
answered on 23 Jun 2016, 07:11 AM

Hi Iliana,

Thanks for the reply! By adding xaxis and Y axis title work as expected.

Thank you so much for the help.

 

Tags
Charts
Asked by
Isha
Top achievements
Rank 1
Answers by
Iliana Dyankova
Telerik team
Isha
Top achievements
Rank 1
Share this question
or