After integrating d3.js into my code, I now have an array with key-value pairs. Each team is assigned a key and its corresponding cost is the value. When I check the console log, it looks like this:
Console.log for key and value
Rate for current month [{"key":"Sample 1","value":6400},{"key":"Sample 2","value":3200}]
Rate for next month [{"key":"Sample 1","value":7360},{"key":"Sample 2","value":3680}]
Rate for 2nd next Month [{"key":"Sample 1","value":7040},{"key":"Sample 2","value":3520}]
- I need to use three different arrays in ngFor to display these values correctly in a table on the browser. Here's the code and how the table is displayed:
Table Display
- Below is the TypeScript file:
- The first column displaying the "Current Month" is correct as I used the key value from the same array. However, the other two columns are not displaying as expected. Any help would be greatly appreciated.