Skip to content
프로젝트

소개

Composable graphing component library for EmberJS.

웹 및 앱 개발

이 수치를 측정하는 방법

측정된 스타 증가

in 24h
0
in 7 days
0
in 15 days
0
in 1 month
기록 수집 중

서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.

README.md

Original

Build Status npm version

ember-nf-graph

A Component-based DSL for creating graphs in your Ember app. The goal of the library is to create a set of components that allows application or component authors to build graphs in a compositional way. This includes components for templated axes, graph lines, areas, stacked areas, bar graphs, and much more. Check the documentation for more information.

A basic graph example is as follows:

export default Ember.Route.extend({
  model() {
    return {
      myLineData: [
        { x: 0, y: 12 },
        { x: 1, y: 32 },
        { x: 2, y: 42 },
        // ...
      ],
      myAreaData: [
        { x: 0, y: 43 },
        { x: 1, y: 54 },
        { x: 2, y: 13 },
        // ...
      ]
    };
  }
});
{{#nf-graph width=500 height=300 as |nf|}}
  {{#nf.graph as |graph|}}
    <!-- add a line -->
    {{graph.line data=model.myLineData}}

    <!-- add an area -->
    {{graph.area data=model.myAreaData}}

    <!-- mix in any SVG element you want -->
    <circle cx="40" cy="40" r="10"></circle>
  {{/nf.graph}}

	<!-- axis ticks are templateable as well -->
  {{#nf.y-axis as |tick|}}
    <text>{{tick.value}}</text>
  {{/nf.y-axis}}


  {{#nf.x-axis as |tick|}}
    <text>{{tick.value}}</text>
  {{/nf.x-axis}}
{{/nf-graph}}

Installation

This set of Ember components requires Ember-CLI 0.2.0 or higher and Ember 1.10.0 or higher.

To install, simply run ember install ember-nf-graph, or npm install -D ember-nf-graph

Documentation

  • Online at: netflix.github.io/ember-nf-graph/docs (generated by YUIDocs)
  • In package: Documentation for these components is included in the package, and can be found under node_modules/ember-nf-graph/docs/index.html just open in any browser.

Contributing

  • git clone this repository
  • npm install

Running

Running Tests

  • ember test
  • ember test --server

Building

  • ember build

For more information on using ember-cli, visit http://www.ember-cli.com/.

Generating Documentation

This project uses YUIDoc to generate documentation. Once YUIDoc is installed run:

yuidoc -c yuidoc.json

The documentation is located in docs/.

관련 프로젝트 살펴보기

불러오는 중…