3

I have a webpage with a table made with ng-repeat. Now I want to display the prices ( = {{amount}} ) in the array, in a line chart.

Code:

<table>
    <tr ng-repeat="tx in data.transactions | filter:filterQuery">
        <td>{{tx.date}}</td>
        <td>{{tx.account}}</td>
        <td>{{tx.action}}</td>
        <td>{{tx.amount}}</td>
        <td>{{tx.categorie}}</td>
    </tr>
</table>

After some research I found some examples:

  • D3js

  • ChartJS

  • Highcharts

But I can not seem to find a tutorial or example with a simple line chart.

Ganesh Yadav
  • 2,607
  • 2
  • 29
  • 52
Egghead
  • 6,837
  • 5
  • 20
  • 38

1 Answers1

7

Try this:

http://n3-charts.github.io/line-chart/#/

  • built on top of D3.js and AngularJS
  • examples included
  • super easy to use with angular
user2847643
  • 2,893
  • 14
  • 22
  • 2
    I tried using n3-charts (line-chart) and if your data isn't in the exact format as they want with the same variable names, then their chart doesn't work and to use your own axis or series doesn't work either. – JARRRRG Oct 10 '14 at 09:19
  • 1
    n3-charts creator here. There is indeed a specific format that the chart accepts, it is for performance reasons mostly. About the 'to use your own axis or series', I'd be glad to hear more about that ! :) – LoremIpsum Dec 04 '15 at 11:44
  • can you please see my question maybe you would have an idea http://stackoverflow.com/questions/37256487/i-want-to-change-the-chart-for-each-city-or-subcity-selected – Abderrahim May 17 '16 at 14:32