1.4.1 • Published 6 years ago

ember-anychart v1.4.1

Weekly downloads
7
License
Apache-2.0
Repository
github
Last release
6 years ago

Ember Plugin for AnyChart

AnyChart Component for Ember CLI provides an easy way to use AnyChart JavaScript Charts with Ember Framework.

Download and install

Install dependencies

First, you need to download and install NodeJS if you don’t have it installed already.

To use the ember-anychart plugin, you should also have Bower and Ember CLI installed.

  • npm install -g bower
  • npm install -g ember-cli

Install plugin globally

You can install ember-anychart plugin using npm or yarn package managers:

  • npm install -g ember-anychart
  • yarn global add ember-anychart

Install plugin into a project

To install ember-anychart plugin into an ember project, navigate to project directory and install the package:

  • ember install --save ember-anychart
  • npm install --save ember-anychart
  • yarn add ember-anychart

If you installed plugin via npm or yarn then you should complete installation by generation plugin blueprint

  • ember generate ember-anychart

Usage

Use the following custom element in a Handlebars template file:

// Create a simple chart using attributes
{{ember-anychart type="pie" data=someData title="My simple chart"}}

// Create a chart using chart instance
{{ember-anychart instance=model.chart}}

// Create a dashboard using a stage instance
{{ember-anychart instance=model.stage}}

// Also you can set id and class of a container where chart is placed
{{ember-anychart instance=model.chart id="chart-container" class="custom-styled-container"}}

Component attributes

AttributeTypeDescriptionRequired
instanceObjectA chart or a stage instance. If you use this parameter, then type attribute is ignored.Required (if type is not defined)
typeStringChart type. Use this to create a simple chart. This parameter is ignored when an instance is defined.Required (if instance is not defined)
afterDrawFunctionChart after draw callback function. This parameter is ignored when 'instance' param is defined and it is a stage instance.optional
A chart or stage settingsYou can use any chart or stage settings as an attribute, like data, title, label, legend and so on.optional

Examples

Please see a sample applications in the ember-anychart/tests/dummy/ folder.

How to run a sample application

You should have NodeJs, Ember, and Bower installed. See Download and install.

Clone and install:

git clone https://github.com/AnyChart/AnyChart-Ember
cd AnyChart-Ember
npm install
bower install
ember server

Then open browser at http://localhost:4200

Sample files

ExampleFilesDescription
Simple chartember-anychart/tests/dummy/app/routes/simple-chart.jsember-anychart/tests/dummy/app/templates/simple-chart.hbsShows how to create a simple Line Chart by creating chart instance and passing it to instance attribute of the component.
Chart with custom settingsember-anychart/tests/dummy/app/routes/chart-with-custom-settings.jsember-anychart/tests/dummy/app/templates/chart-with-custom-settings.hbsShows a simple Pie Chart with type, data and title attributes.Also shows how to use afterDraw callback.
Simple dashboardember-anychart/tests/dummy/app/routes/simple-dashboard.jsember-anychart/tests/dummy/app/templates/simple-dashboard.hbsDashboard with stage instance set to instance attribute.
Chart with dynamic settingsember-anychart/tests/dummy/app/routes/chart-with-dynamic-settings.jsember-anychart/tests/dummy/app/templates/chart-with-dynamic-settings.hbsember-anychart/tests/dummy/app/controllers/chart-with-dynamic-settings.jsDynamic change of chart palette setting with the help of ember controller action.
Data streamingember-anychart/tests/dummy/app/routes/data-streaming.jsember-anychart/tests/dummy/app/templates/data-streaming.hbsDynamic change of chart data.
Simple stock chartember-anychart/tests/dummy/app/routes/simple-stock-chart.jsember-anychart/tests/dummy/app/templates/simple-stock-chart.hbsember-anychart/tests/dummy/public/stock-data.jsonA simple Stock Chart. Shows how you can load a big data set from a JSON file.
Geographical colored mapember-anychart/tests/dummy/app/routes/geographical-colored-map.jsember-anychart/tests/dummy/app/templates/geographical-colored-map.hbsember-anychart/tests/dummy/public/united_states_of_america.topo.jsonColored Geographical Map with geo data loaded from a file.
Simple gantt chartember-anychart/tests/dummy/app/routes/simple-gantt-chart.jsember-anychart/tests/dummy/app/templates/simple-gantt-chart.hbsSimple Gantt Chart.

Versions

  • Code in the v1.1.1 branch works with Ember version 2.10
  • Code in the master branch works with Ember version 2.14 and higher

Contacts

Links

License

© AnyChart.com - JavaScript charts. Analytics

1.4.1

6 years ago

1.4.0

7 years ago

1.3.0

7 years ago

1.2.0

7 years ago

1.1.1

7 years ago

1.1.0

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago

0.7.6

7 years ago

0.7.5

7 years ago

0.7.4

7 years ago

0.7.3

7 years ago

0.7.2

7 years ago

0.7.1

7 years ago

0.7.0

7 years ago

0.6.1

7 years ago

0.6.0

7 years ago

0.5.1

7 years ago

0.5.0

7 years ago

0.4.0

7 years ago

0.3.0

7 years ago

0.2.0

7 years ago

0.1.0

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago

0.0.0

7 years ago