Hi, I'm trying to create a column chart using the following script sniplet.
<script type="text/javascript"> $(function () { $("#IV1040Chart__U8BC75vo7q").igDataChart({ dataSource: new $.ig.JSONPDataSource({ dataSource: "/Web/Pending/ChartData/IV1040Chart__U8BC75vo7q?Key=U8BC75vo7q5xLGY5yqr%2F6pc%2B7RS1K%2F4hKsseAy8MM5xFg9PzWqUOjcX2I%2Fczs85WD5x%2F%2BTFJchOCMGw2Z7YDkwkXQ5g%2Fspyfk5AqvZ4rfe3ZnbE3TJp7ewKpFaIhHAeVEWPKCqLu0FWmkHtX2hCj%2BCxUZE09Q57yg%2FJHwFkdI8HXO3%2B0ZfLxVb9nrYbGgN0n&Pivot=False", type: "remoteUrl", responseDataKey: "Table" }), axes: [{ name: "xAxis", type: "categoryX", label: "Employee" },{ name: "yAxis", type: "numericY", label: "" }], series: [{ name: "series0", title: "SalesTarget", type: "column", xAxis: "xAxis", yAxis: "yAxis", valueMemberPath: "SalesTarget" }], width: "-1px", height: "300", brushes: [ "#B1C8BC","#883288" ], overviewPlusDetailPaneVisibility: "visible",horizontalZoomable: true,verticalZoomable: true,windowResponse: "deferred" }); });</script>
As the chart is rendered I receive the following scripting error,
"Microsoft JScript runtime error: Unable to get value of the property 'left': object is null or undefined"
At the following line
this.context().drawImage(this.thumbnailCanvas()[0], rect.left(), rect.top(), rect.width(), rect.height());
in the "undirty:function(clearRect)" function in ig.ui.chart script file.
Please can u advise on how to get rid of this error, It's kind of killing my VS while debugging although chart does render afterwards.
Thanks in advance.
Looking at the change you made, though, that is probably a good work around in the short term, but it would help to know the circumstances that replicated this issue.
Hi,
I would caution against modifying any of those methods by hand, or you may have issues merging the fixes into subsequent versions. A better solution would be for us to fix the issue you are having on our end so that we have it in the codebase. As I said, I had issues replicating the problem on the RTM version of the chart. Is there a ways you can provide a sample the replicates the issue and information about which browser version you are experiencing the problem with?
-Graham
Hi Graham
I resolved the issue by editing the infragistics.dv.core.js file.
I modified the renderPreview function as follow.
renderPreview: function () { if (!this.u()) { return; } var a = new $.ig.RenderSurface(); a.b(this.q().ae().cz().ar()); var b = this.q().ae().cz().as(); var functionBResult = a.b(); if (functionBResult) { functionBResult.s(0, 0, b.c(), b.d()); this.q().bc(b.c(), b.d(), a); this.u(false); } }
Thanks.
I'm not seeing the issue with the RTM version of the chart. So please make sure you have the correct JS files referenced.This is the code I'm using to test (substituting an array for the data source that I don't have access to):
var testData = [{ Employee: "bob", SalesTarget: 5 }, { Employee: "chris", SalesTarget: 3 }, { Employee: "jen", SalesTarget: 9 }, { Employee: "meg", SalesTarget: 6 }]; $(function () { $("#Chart1").igDataChart({ dataSource: testData, axes: [{ name: "xAxis", type: "categoryX", label: "Employee" }, { name: "yAxis", type: "numericY", label: "" }], series: [{ name: "series0", title: "SalesTarget", type: "column", xAxis: "xAxis", yAxis: "yAxis", valueMemberPath: "SalesTarget" }], width: "-1px", height: "300", brushes: ["#B1C8BC", "#883288"], overviewPlusDetailPaneVisibility: "visible", horizontalZoomable: true, verticalZoomable: true, windowResponse: "deferred" }); });
Hope this helps!-Graham
Hi, when you copied the scripts from 12.1 did you update your javascript references? the file names have changed, so you may still be referring to the old file from the CTP.
The best thing to do would be to transition to using the infragistics loader as shown in the samples to load the javascript files.
Is there a reason you are setting the width to -1px?