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
55
Suspected Race Condition with igDataChart loading
posted

The file needed to load the chart JS is being loaded AFTER the the .igDataChart is being called. I get the null reference exception before I see "http://cdn-na.infragistics.com/jquery/20122/latest/js/modules/infragistics.ui.chart.js" being loaded and it is becoming a source of immense frustration

This is the code I am using to render out the page. The "Scripts" section is rendered into the head tag

Attempts
@(Html.Infragistics().DataChart(Model.AttemptHistory.AsQueryable()) .ID("attemptChart") .Width("768px") .Height("242px") .VerticalZoomable(true) .HorizontalZoomable(true) .Legend(l => l.ID("attemptLegend")) .Axes(ax => { ax.CategoryX("Date").Label(d => d.Date); ax.NumericY("Value").Label(v => v.Value); }) .Series(s => { s.Column("seriesAttempts") .Title("Attempts") .XAxis("Date").YAxis("Value") .ShowTooltip(true) .TooltipTemplate("tooltipTemplate"); }).DataBind().Render() )
Total: @Model.TotalAttempts
@section Scripts { // Value: ${item.Open} // ]]> @Html.Infragistics().Loader().Resources("igDataChart.Category").Render() }

In the head tag

@Html.Infragistics().Loader().ScriptPath("http://cdn-na.infragistics.com/jquery/20122/latest/js/").CssPath("http://cdn-na.infragistics.com/jquery/20122/latest/css/").Render()

Well it would appear that formatting is lost...I'm not sure how to preserve code formatting. I've been looking at this sample over and over again and I appear to be doing almost verbatim what is written down and yet I'm getting .igDataChart is undefined. What am I doing wrong?