项目作者: asztalosdani

项目描述 :
A plotting library for Fitbit, based on [Plotly](https://plotly.com/javascript/).
高级语言: JavaScript
项目地址: git://github.com/asztalosdani/fitbit-plotty.git
创建时间: 2020-06-03T20:08:19Z
项目社区:https://github.com/asztalosdani/fitbit-plotty

开源协议:

下载


Fitbit-Plotty

A plotting library for Fitbit, based on the awesome Plotly.

:warning: Fitbit-Plotty is work in progress, consider it as alpha quality. The usage may change any time! :warning:

Features

  • 100% Compatibility with Plotly API (soon)
  • Supported plot types

    • Scatter plot
    • Bar chart
    • Pie chart

      Quickstart

      1. Import the gui in your widgets.gui

      1. <link rel="import" href="/fitbit_plotly.gui"/>

      2. Setup the chart and add enough elements in your index.gui.

      1. <svg>
      2. <use id="myDiv" href="#chart" x="0" y="0" width="100%" height="200">
      3. <use href="#line"></use>
      4. <use href="#line"></use>
      5. <use href="#line"></use>
      6. <use href="#line"></use>
      7. <use href="#line"></use>
      8. <use href="#bar"></use>
      9. <use href="#bar"></use>
      10. <use href="#bar"></use>
      11. <text text-length="16"></text>
      12. <text text-length="16"></text>
      13. <text text-length="16"></text>
      14. <text text-length="16"></text>
      15. <text text-length="16"></text>
      16. <text text-length="16"></text>
      17. <text text-length="16"></text>
      18. <text text-length="16"></text>
      19. </use>
      20. </svg>

      3. Setup the plot in your javascript code.
      ```javascript
      import * as Plotly from “./fitbit-plotly”

var data = [
{
x: [‘giraffes’, ‘orangutans’, ‘monkeys’],
y: [20, 14, 23],
type: ‘bar’
}
];

Plotly.newPlot(‘myDiv’, data);
```
4. Enjoy :)

Alt text

Installation

Download and copy the js files and widgets.gui to your project.
More user-friendly installation coming soon.

Usage

TODO

Limitations

color only hex, no rgb(12, 67, 191)

Known issues

  • Pie chart has to be double tapped to emit a click event.
    There is an issue with the onclick listener of an element that uses mask. As a result, the onclick listener is called only if it is tapped twice.

Apps with Fitbit-Plotty

Covid-19 Tracker: by me Alt text Track the corona virus from your Fitbit. This app is the main reason I made this library.
Your project here Create an issue, or a pull request to include your app here.

Support

Found a bug? Missing a specific feature?

Feel free to file a new issue, or if you already have a solution create a pull request.

Donations

You can help further development of Fitbit-Plotty by buying me a coffee. Also consider donating if you are using Fitbit-Plotty in a paid app.

ko-fi

License

TODO