GithubHelp home page GithubHelp logo

azu / notion-plotly Goto Github PK

View Code? Open in Web Editor NEW
12.0 3.0 2.0 28 KB

Create embed graph page from Notion Database.

Home Page: https://notion-plotly.netlify.app

License: MIT License

HTML 43.04% JavaScript 56.96%

notion-plotly's Introduction

Notion Plotly

Simple graph generator for Notion. This page render graph using url parameters.

Usage

Pass following parameters to graph page.

Bar Charts: /bar.html

  • x=1,2,3,4: x values
  • y=1,2,3,4: y values
  • group=A,A,B,B: group values
  • sortBy=?: sort values by x or y or group

Pie Charts: /pie.html

  • values=1,2,3,4: values
  • labels=a,b,c,d: labels

Examples

Integration with Notion

Notion Template: https://efcl.notion.site/Notion-Plotly-f38a5b4fafb342b6b9b3dea6e7de102c

  1. Create new Database
  2. Add the database's relation to another database which you want to collect data from
  3. Rollup properties
  4. Create URL using formula

Example

"https://notion-plotly.netlify.app/bar.html?sortBy=x&y=" + prop("Value") + "&x=" + replaceAll(replaceAll(replaceAll(prop("Date"), "年", "/"), "月", "/"), "日", "") + "&group=" + prop("Company")

📝 Notion does not allow to use non-Ascii URL for embed.

Contributing

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request :D

Welcome to new charts

License

MIT

Supports

Powered by netlify and plotly.

notion-plotly's People

Contributors

azu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.