jQuery UI Widgets › Forums › Chart › Unable to set property ‘dataAdapter’ of undefined or null reference
Tagged: chart, Charts dataAdapter undefined null reference, javascript chart, jquery chart, jqwidgets chart
This topic contains 2 replies, has 2 voices, and was last updated by Hristo 8 years ago.
-
Author
-
April 14, 2017 at 12:56 pm Unable to set property ‘dataAdapter’ of undefined or null reference #92923
I’m trying to create a chart on an ASP.NET Core site.
But i get this error when i try loading the page with the chart:“Unable to set property ‘dataAdapter’ of undefined or null reference”
At this part of the code:
“var adapter = new $.jqx.dataAdapter(source);”
This is the code where it happens:
<script type=”text/javascript” src=”../../scripts/jquery-1.11.1.min.js”></script>
<script src=”~/jqwidgets/jqx-all.js”></script>@using DataSamlingAspNetCore.Models.Database;
@using jQWidgets.AspNetCore.Mvc.TagHelpers;
@model IEnumerable<Test>
@{
Padding padding = new Padding() { Left = 5, Top = 5, Right = 35, Bottom = 5 };
Padding titlePadding = new Padding() { Left = 90, Top = 0, Right = 0, Bottom = 10 };
FormatSettings formatSettings = new FormatSettings() { Sufix = “%”, DecimalPlaces = 1 };
}
<jqx-chart style=”width: 850px; height: 500px;” color-scheme=”scheme02″ padding=”padding” title-padding=”titlePadding” title=”Varme” description=”Varme i celcius inden for en given tidsperiode” source=”Model”>
<jqx-chart-x-axis type=”AxisType.Date” base-unit=”BaseUnit.Day” datafield=”Dato” show-grid-lines=”true”></jqx-chart-x-axis>
<jqx-chart-series-groups>
<jqx-chart-serie-group show-labels=”true” columns-gap-percent=”50″ series-gap-percent=”0″ type=@SerieType.Line>
<jqx-chart-value-axis axis-size=”auto” display-value-axis=”true” description=”Time in minutes” tick-marks-color=”#888888″ min-value=”0″ max-value=”100″ unit-interval=”10″></jqx-chart-value-axis>
<jqx-chart-series>
<jqx-chart-serie symbol-type=”square” datafield=’Temperatur’ display-text=’Varme’></jqx-chart-serie>
</jqx-chart-series>
</jqx-chart-serie-group>
</jqx-chart-series-groups>
</jqx-chart>April 18, 2017 at 4:00 pm Unable to set property ‘dataAdapter’ of undefined or null reference #92974For some reason this part of my code made the error:
@*<environment names=”Development”>
<script src=”~/lib/jquery/dist/jquery.js”></script>
<script src=”~/lib/bootstrap/dist/js/bootstrap.js”></script>
<script src=”~/js/site.js” asp-append-version=”true”></script>
</environment>
<environment names=”Staging,Production”>
<script src=”https://ajax.aspnetcdn.com/ajax/jquery/jquery-2.2.0.min.js”
asp-fallback-src=”~/lib/jquery/dist/jquery.min.js”
asp-fallback-test=”window.jQuery”
crossorigin=”anonymous”
integrity=”sha384-K+ctZQ+LL8q6tP7I94W+qzQsfRV2a+AfHIi9k8z8l9ggpc8X+Ytst4yBo/hH+8Fk”>
</script>
<script src=”https://ajax.aspnetcdn.com/ajax/bootstrap/3.3.7/bootstrap.min.js”
asp-fallback-src=”~/lib/bootstrap/dist/js/bootstrap.min.js”
asp-fallback-test=”window.jQuery && window.jQuery.fn && window.jQuery.fn.modal”
crossorigin=”anonymous”
integrity=”sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa”>
</script>
<script src=”~/js/site.min.js” asp-append-version=”true”></script>
</environment>*@April 21, 2017 at 12:02 pm Unable to set property ‘dataAdapter’ of undefined or null reference #93057Hello Nicklasj25,
You try to set somewhere “dataAdapter” there is no such property.
I would like to suggest you this tutorial:
http://www.jqwidgets.com/jquery-widgets-documentation/documentation/asp-net-core/mvc-tag-helpers.htm?search=
I would like to focus your attention on@model IEnumerable<jQWidgets.AspNet.Core.Models.BrowserShare>
.Best Regards,
Hristo HristovjQWidgets team
http://www.jqwidgets.com -
AuthorPosts
You must be logged in to reply to this topic.