ASPForums.Net RSS Feedhttp://www.aspforums.net/Handlers/RSS.ashxLatest additions to the content that appears on ASPForums.Net(c) 2019 www.aspforums.com. All rights reserved.Angular7 Error: Argument of type x is not assignable to parameter of type x<blockquote><cite>Richa12 says:</cite> <pre><code class="js spaces">&nbsp;</code><code class="js keyword">return</code> <code class="js plain">[item[1], item[0], item[2] || </code><code class="js string">'-'</code><code class="js plain">];</code></pre> </blockquote> <p>Please check the above line of code.</p> <p>You are assigning string value in the or condition which expects integer value.</p>https://www.aspforums.net:443/Threads/176216/Angular7-Error-Argument-of-type-x-is-not-assignable-to-parameter-of-type-x/https://www.aspforums.net:443/Threads/176216/Angular7-Error-Argument-of-type-x-is-not-assignable-to-parameter-of-type-x/Tue, 23 Jul 2019 00:46:46 GMTAngular7 Error: Argument of type x is not assignable to parameter of type x<p>I have fixed mentioned errors but now I am facing another(described below) typescript error:</p> <pre class="lang-js prettyprint prettyprinted"><code><span class="typ">Type</span> <span class="str">'(string | number)[][]'</span><span class="pln"> is not assignable to type </span><span class="str">'number[][]'</span><span class="pun">.</span> <span class="typ">Type</span> <span class="str">'(string | number)[]'</span><span class="pln"> is not assignable to type </span><span class="str">'number[]'</span><span class="pun">.</span> <span class="typ">Type</span> <span class="str">'string | number'</span><span class="pln"> is not assignable to type </span><span class="str">'number'</span><span class="pun">.</span> <span class="typ">Type</span> <span class="str">'string'</span><span class="pln"> is not assignable to type </span><span class="str">'number'</span><span class="pun">.</span><span class="pln">ts</span><span class="pun">(</span><span class="lit">2322</span><span class="pun">)</span><span class="pln"> chart</span><span class="pun">.</span><span class="pln">component</span><span class="pun">.</span><span class="pln">ts</span><span class="pun">(</span><span class="lit">77</span><span class="pun">,</span> <span class="lit">13</span><span class="pun">):</span> <span class="typ">The</span><span class="pln"> expected type comes from property </span><span class="str">'data'</span><span class="pln"> which is declared here on type </span><span class="str">'{ type: string; symbol: string; symbolSize: number; itemStyle: { normal: { color: string; }; }; data: number[][]; }'</span></code></pre> <p>Code:</p> <pre class="brush: html">var datar = [ { name: &#39;TEST-A&#39;, data: [ [4,4],[25,4],[700,4],[4,40],[25,40],[160,40] ], xmax: 700, ymax: 40, color: &#39;purple&#39;, }, { name: &#39;TEST-B&#39;, data: [ [10.0, 8.04], [8.0, 6.95], [13.0, 7.58], [9.0, 8.81], xmax: 160, ymax: 400, color: &#39;green&#39;, } ]; var objseries = datar.map(function(x) { return { type: &#39;scatter&#39;, symbol: &#39;diamond&#39;, symbolSize: 10, itemStyle:{ normal:{ color: x.color } }, data: x.data.map(function (item) { return [ item[0] &lt;= x1 ? 0 + ((item[0] - 0) / ((x1 - 0) / 100)) / 100 : (item[0] &lt;= x2 ? 1 + ((item[0] - x1) / ((x2 - x1) / 100)) / 100 : (item[0] &lt;= x3 ? 2 + ((item[0] - x2) / ((x3 - x2) / 100)) / 100 : 2)), item[1] &lt;= y1 ? 0 + ((item[1] - 0) / ((y1 - 0) / 100)) / 100 : (item[1] &lt;= y2 ? 1 + ((item[1] - y1) / ((y2 - y1) / 100)) / 100 : (item[1] &lt;= y3 ? 2 + ((item[1] - y2) / ((y3 - y2) / 100)) / 100 : 2)), item[0], item[1] ]; }), } }); objseries.splice(0, 0, { name: &#39;Severe Moderate Mild&#39;, xAxisIndex : 1, yAxisIndex : 1, type: &#39;heatmap&#39;, data: data, //<span style=&#34;color: #993366;&#34;><strong>error here</strong></span> label: { normal: { show: false } } }); </pre> <p>This code will then go and sit in 'series' property of<a href="https://echarts.apache.org/examples/en/editor.html?c=doc-example/scatter-visualMap-categories&amp;edit=1&amp;reset=1" rel="nofollow noreferrer">https://echarts.apache.org/examples/en/editor.html?c=doc-example/scatter-visualMap-categories&amp;edit=1&amp;reset=1</a>&nbsp;(this link is just for example to explain the relation)</p> <p>Kindly let me know how to fix this. I am stuck at this point to commit my changes. Thank you so much in advance</p>https://www.aspforums.net:443/Threads/176216/Angular7-Error-Argument-of-type-x-is-not-assignable-to-parameter-of-type-x/https://www.aspforums.net:443/Threads/176216/Angular7-Error-Argument-of-type-x-is-not-assignable-to-parameter-of-type-x/Tue, 23 Jul 2019 08:36:27 GMTAngular7 Error: Argument of type x is not assignable to parameter of type x<p>Refer below links.</p> <p><a href="https://github.com/Microsoft/TypeScript/issues/22870">https://github.com/Microsoft/TypeScript/issues/22870</a></p> <p><a href="https://stackoverflow.com/questions/53511050/why-type-number-is-not-assignable-to-type-t">https://stackoverflow.com/questions/53511050/why-type-number-is-not-assignable-to-type-t</a></p> <p>&nbsp;</p>https://www.aspforums.net:443/Threads/176216/Angular7-Error-Argument-of-type-x-is-not-assignable-to-parameter-of-type-x/https://www.aspforums.net:443/Threads/176216/Angular7-Error-Argument-of-type-x-is-not-assignable-to-parameter-of-type-x/Wed, 24 Jul 2019 03:21:40 GMT