epochjs/epoch
Composer 安装命令:
composer require epochjs/epoch
包简介
A general purpose, real-time visualization library.
README 文档
README
By Ryan Sandor Richards
Epoch is a general purpose charting library for application developers and visualization designers. It focuses on two different aspects of visualization programming: basic charts for creating historical reports, and real-time charts for displaying frequently updating timeseries data.
To get started using Epoch, please refer to the Epoch Project Site. There you can find full documentation and guides to help you start using Epoch right away.
Installation
Epoch can be easily installed via the following package managers:
If you don't see your favorite package manager in the list above feel free to open up an issue and let us know. Finally, you can download any release of the library from the project releases page.
Important: Epoch requires d3. In order to work properly your page must load d3 before epoch.
Public CDN URLs
If you don't want to host the files yourself, you can use jsDelivr to serve the files:
- Visit epoch page on jsDelvr.
- Copy the provided URL's and link to them in your project.
Developing Epoch
Developing Epoch is a reasonably straight forward process. In this section we'll cover the basic on how to develop Epoch by detailing common build task, exploring how the source is arranged, and finally show how to use rendering tests to aid development.
Configuring Development Environment
Epoch requires the following for development:
Once both are installed on your machine you will need to run npm install from
the repository's root directory in order to install the npm packages required
to develop epoch.
Once you have installed the required npm packages you can use gulp build to
fully rebuild the source (see more information about gulp tasks below).
Basic Development Process
The best way to start contributing to Epoch is to follow these steps:
- Change to the source directory for the project
- Run
gulp watchto recompile the project after source files change - Make changes in a source file (either in
src/orsass/) - In a web browser open the
test/index.htmland browse the rendering tests - Use the rendering tests to see if your changes had the desired result
- Ensure unit tests with pass
npm test
Testing
Epoch uses two types of testing to ensure that changes do not cause unintended side effects. The first, unit tests, ensure that the core functional components of the library work as expected. The second, rendering tests, allow you to ensure that charts and graphs are correctly rendered.
It is important to keep both unit test and rendering tests up-to-date! When developing, use the following guidelines:
- When adding new features make sure to add new tests
- When changing existing functionality, ensure that the appropriate both types of tests still pass
- If you want to make a new type of chart, add a whole new test suite for that chart!
Keeping the tests current makes it easier for others to review your code and spot issues. Also, pull requests without appropriate testing will not be merged.
Gulp Tasks
Epoch uses gulp to perform various tasks. The
gulpfile.js file defines the following tasks:
gulp clean- Cleans thedist/directory.gulp build- Builds the CoffeeScript and Sass source into thedist/directory.gulp watch- Starts a watch script to recompile CoffeeScript and Sass when any files change.
Source Structure
The directory structure for the Epoch project follows some basic guidelines, here's an overview of how it is structured:
dist/ - Compiled JavaScript and CSS source
src/ - Main source directory
core/ - Core Epoch Library Files
util.coffee - Library Utility Routines
d3.coffee - d3 Extensions
format.coffee - Data formatters
chart.coffee - Base Chart Classes
css.coffee - CSS Querying Engine
adapters/ - 3rd Party Library Adapters (currently only jQuery)
basic/ - Basic Chart Classes
time/ - Real-time Chart Classes
adapters.coffee - Options / Global Classes for Adapter Implementations
basic.coffee - Base Classes for Basic Charts
data.coffee - Data Formatting
epoch.coffee - Main source file, defines name spaces, etc.
model.coffee - Data Model
time.coffee - Base Classes for Real-Time Charts
sass/ - Scss source for the default epoch stylesheet
tests/
render/ - Rendering tests
basic/ - Basic chart rendering tests
real-time/ - Real-time rendering tests
unit/ - Unit tests
Release Checklist
- Run
npm testand ensure all tests pass - Run
npm version [major|minor|patch] - Run
npm publish - Update CHANGELOG.md with the changes since last release
- Update the
gh-pagesbranch's library version in_config.yml
epochjs/epoch 适用场景与选型建议
epochjs/epoch 是一款 基于 HTML 开发的 Composer 扩展包,目前已累计 574 次下载、GitHub Stars 达 4.95k, 最近一次更新时间为 2015 年 10 月 14 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「real-time」 「graph」 「chart」 「plot」 「epoch」 「d3」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 epochjs/epoch 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 epochjs/epoch 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 epochjs/epoch 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Simple PHP chart drawing library
Talk is a Laravel based realtime messaging, chatting and conversation system. It helps to develop users messaging, chatting and conversations in easy way.
Netgen Open Graph Bundle is an Ibexa Platform bundle that allows simple integration with Open Graph protocol.
Yii2 chartjs
A tool for scraping URL resources (oEmbed, OpenGraph, Twitter cards, JSON-LD)
Boxalino Real Time User Experience (RTUX) Magento2 plugin
统计信息
- 总下载量: 574
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 4950
- 点击次数: 28
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2015-10-14