GithubHelp home page GithubHelp logo

tjorriemorrie / highcharts-ng Goto Github PK

View Code? Open in Web Editor NEW

This project forked from pablojim/highcharts-ng

2.0 2.0 0.0 56 KB

AngularJS directive for Highcharts

License: MIT License

JavaScript 100.00%

highcharts-ng's Introduction

highstocks-ng

This is a fork from pablojim's highcharts-ng directive. This caters for using highstock charts instead of highcharts. The directive is different than to pablojim's directive. Instead of attributes on the element, this binds to a model, which mirrors the config in the highstock api. This is more appropriate imo, e.g. on highchart element you specify title attr, but then you get the attribute value as tooltip when you hover on the chart.

Usage

Include highstocks-ng file. The directive can only be used as an element called highstock. The element must have a ng-model assigned to it.

html: <highstock ng-model="mychart"></highstock>

controller: $scope.mychart = { title: { text: 'highstock ftw' }, series: [] }

Issues

  • Does not resize to 100% width of parent. (same issue with highcharts-ng).
  • Currently only listens if series object changes and recreates chart, thus it's not dynamic (WIP)

highcharts-ng

AngularJS directive for Highcharts

A simple Angularjs directive for Highcharts.

<highchart id="chart1" series="chart.series" title="chart.title" options="chart.options"></highchart>

See an example here: http://jsfiddle.net/pablojim/Cp73s/

Features:

  • Adding and removing series
  • Setting/Updating Chart options
  • Updating the chart title

Caveats:

  • Due to many equality checks the directive maybe slow with large datasets (this is solvable though...)
  • Whole Chart/Series is often redrawn where a simple update of data would suffice
  • Needs tests!

See an example here: http://jsfiddle.net/pablojim/Cp73s/

highcharts-ng's People

Contributors

pablojim avatar tjorriemorrie avatar

Stargazers

matt avatar Alyssa Biasi avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.