All Projects → marmelab → Eventdrops

marmelab / Eventdrops

Licence: mit
A time based / event series interactive visualization using d3.js

Programming Languages

javascript
184084 projects - #8 most used programming language

Labels

Projects that are alternatives of or similar to Eventdrops

silky-charts
A silky smooth D3/React library
Stars: ✭ 38 (-96.74%)
Mutual labels:  d3, dataviz
multi-verse
lit-element components for fast and modular multivariate analysis
Stars: ✭ 34 (-97.08%)
Mutual labels:  d3, dataviz
aws-mlu-explain
Visual, Interactive Articles About Machine Learning: https://mlu-explain.github.io/
Stars: ✭ 46 (-96.05%)
Mutual labels:  d3, dataviz
react-d3-integration
An example on how to integrate D3 into React
Stars: ✭ 14 (-98.8%)
Mutual labels:  d3, dataviz
Ngx Charts
📊 Declarative Charting Framework for Angular
Stars: ✭ 4,057 (+248.54%)
Mutual labels:  dataviz, d3
covid-19
Current and historical coronavirus covid-19 confirmed, recovered, deaths and active case counts segmented by country and region. Includes csv, json and sqlite data along with an interactive website explorer.
Stars: ✭ 15 (-98.71%)
Mutual labels:  d3, dataviz
leaflet heatmap
简单的可视化湖州通话数据 假设数据量很大,没法用浏览器直接绘制热力图,把绘制热力图这一步骤放到线下计算分析。使用Apache Spark并行计算数据之后,再使用Apache Spark绘制热力图,然后用leafletjs加载OpenStreetMap图层和热力图图层,以达到良好的交互效果。现在使用Apache Spark实现绘制,可能是Apache Spark不擅长这方面的计算或者是我没有设计好算法,并行计算的速度比不上单机计算。Apache Spark绘制热力图和计算代码在这 https://github.com/yuanzhaokang/ParallelizeHeatmap.git .
Stars: ✭ 13 (-98.88%)
Mutual labels:  d3, dataviz
lineage
Family Tree Data Expression Engine
Stars: ✭ 90 (-92.27%)
Mutual labels:  d3, dataviz
Mozaik
Mozaïk is a tool based on nodejs / react / redux / nivo / d3 to easily craft beautiful dashboards
Stars: ✭ 3,546 (+204.64%)
Mutual labels:  dataviz, d3
Flask jsondash
🐍 📊 📈 Build complex dashboards without any front-end code. Use your own endpoints. JSON config only. Ready to go.
Stars: ✭ 3,215 (+176.2%)
Mutual labels:  dataviz, d3
d3-gridding
grids for rapid D3 charts mockups
Stars: ✭ 100 (-91.41%)
Mutual labels:  d3, dataviz
D3 Parliament
A parliament chart based on D3js
Stars: ✭ 44 (-96.22%)
Mutual labels:  dataviz, d3
datalith
Simple, batteries included, components to build beautiful data visualizations
Stars: ✭ 29 (-97.51%)
Mutual labels:  d3, dataviz
reusable-d3-charts
Reusable charts built with D3. Built on Web standards, fully customisable.
Stars: ✭ 33 (-97.16%)
Mutual labels:  d3, dataviz
multi-chart
lit-element building blocks for charts and visualization (based on d3.js v5)
Stars: ✭ 24 (-97.94%)
Mutual labels:  d3, dataviz
proteic
Streaming and static data visualization for the modern web.
Stars: ✭ 37 (-96.82%)
Mutual labels:  d3, dataviz
Keen Dataviz.js
Data Visualization Charting Library
Stars: ✭ 215 (-81.53%)
Mutual labels:  dataviz, d3
ddplot
Create D3 based SVG graphics easily from R
Stars: ✭ 43 (-96.31%)
Mutual labels:  d3, dataviz
Carbon Charts
📊 📈⠀Robust dataviz framework implemented using D3 & typescript
Stars: ✭ 287 (-75.34%)
Mutual labels:  dataviz, d3
Treedu
Graphical Disk Usage command for the terminal, using Node.js, d3.js, blessed, and Drawille
Stars: ✭ 10 (-99.14%)
Mutual labels:  dataviz, d3

EventDrops

EventDrops is a time based / event series interactive visualization tool powered by D3.js.

EventDrops example

If you want to pan and zoom on previous data on your own, here is the demo.

Installation

EventDrops is provided as an npm package. Grab it using the tool of your choice:

yarn add event-drops
npm install --save event-drops

Note you don't need this step if you don't use any module bundler.

Since version 1.0, event-drops follows semantic versionning. Hence, we recommend checking your package.json file and ensure that event-drops version is preceded by a carret:

{
    "event-drops": "^1.0.0"
}

This way, you'll get all bug fixes and non breaking new features.

Usage

Without a Module Bundler

If you don't use any module bundler such as Webpack, we recommend using EventDrop script available on unpkg.com. Grabbing last versions of the library is as simple as:

<link href="https://unpkg.com/event-drops/dist/style.css" rel="stylesheet" />

<script src="https://unpkg.com/d3"></script>
<script src="https://unpkg.com/event-drops"></script>

Then, the code is similar to the one with module bundler (see next paragraph), except you are not forced to specify D3 configuration parameter.

With a Module Bundler

If you use a module bundler, you can import EventDrops the following way:

import * as d3 from 'd3/build/d3';

import eventDrops from 'event-drops';

const chart = eventDrops({ d3 });

const repositoriesData = [
    {
        name: 'admin-on-rest',
        data: [{ date: new Date('2014/09/15 14:21:31') } /* ... */],
    },
    {
        name: 'event-drops',
        data: [{ date: new Date('2014/09/15 13:24:57') } /* ... */],
    },
    {
        name: 'sedy',
        data: [{ date: new Date('2014/09/15 13:25:12') } /* ... */],
    },
];

d3
    .select('#eventdrops-demo')
    .data([repositoriesData])
    .call(chart);

You can either use D3 as a specific import (specifying it in first argument of eventDrops call), or use the global one. By default, it fallbacks to a global defined d3.

Interface

eventDrops function takes as a single argument a configuration object, detailed in the:

Configuration Reference

In addition to this configuration object, it also exposes some public members allowing you to customize your application based on filtered data:

  • scale() provides the horizontal scale, allowing you to retrieve bounding dates thanks to .scale().domain(),
  • filteredData() returns an object with both data and fullData keys containing respectively bounds filtered data and full dataset.
  • draw(config, scale) redraws chart using given configuration and d3.scaleTime scale
  • destroy() execute this function before to removing the chart from DOM. It prevents some memory leaks due to event listeners.
  • currentBreakpointLabel returns current breakpoint (for instance small) among a list of breakpoints.

Hence, if you want to display number of displayed data and time bounds as in the demo, you can use the following code:

const updateCommitsInformation = chart => {
    const filteredData = chart
        .filteredData()
        .reduce((total, repo) => total.concat(repo.data), []);

    numberCommitsContainer.textContent = filteredData.length;
    zoomStart.textContent = humanizeDate(chart.scale().domain()[0]);
    zoomEnd.textContent = humanizeDate(chart.scale().domain()[1]);
};

Contributing

If you want to contribute to EventDrops, first, thank you!

To launch the project locally, grab this repository, install its dependencies, and launch the demo:

git clone [email protected]:marmelab/EventDrops.git
cd EventDrops
make install
make run

Demo will then be available on http://localhost:8080. Source files are watched automatically. Changing one file would automagically reload your browser.

When you are satisfied with your changes, ensure you didn't break anything launching tests:

make test

Finally, if everything is fine, you can then create a pull request.

Feel free to ask some help on GitHub issue tracker. The core team would be glad to help you to contribute.

License

EventDrops is released under the MIT License, courtesy of marmelab and Canal Plus. It means you can use this tool without any restrictions.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].