1.0.46 • Published 5 years ago

timecharts v1.0.46

Weekly downloads
5
License
MIT
Repository
github
Last release
5 years ago

screenshot

Key Features

  • No dependencies
  • Fully responsive
  • Easy to use

How To Use

Installation

Via NPM

Simply install the library:

npm i timecharts

In the Browser

Either use a CDN:

<script src="https://unpkg.com/timecharts@latest/dist/TimeCharts.min.js" type="text/javascript"></script>

Or download it locally:

<script src="./TimeCharts.min.js" type="text/javascript"></script>

Usage

const chart = new TimeCharts.Timeline("#container", {
  scale: {
      from: 7 * 60,
      to: 19 * 60,
      intervalStart: 0
  },
  data: {
      timelines: [
          {
              label: "WORK",
              colors: ["#7cd6fd", "#5e64ff"],
              values: [{
                  start: 8 * 60,
                  length: 120,
                  title: "Project 1"
              },
              {
                  start: 11 * 60,
                  length: 45,
                  title: "Project 2"
              },
              {
                  start: 13 * 60,
                  length: 120,
                  title: "Project 1"
              }]
          },
          {
              label: "STUDY",
              colors: ["#98d85b"],
              values: [{
                  start: 10 * 60,
                  length: 60,
                  title: "Topic 1"
              },
              {
                  start: 15 * 60,
                  length: 90,
                  title: "Topic 1"
              },
              {
                  start: 16 * 60 + 45,
                  length: 90,
                  title: "Topic 1"
              }]
          }
      ],
  },  
  padding: {
      top: 50, 
      left: 50,
      right: 50
  }
});

Documentation

The full documentation can be found here.

License

MIT

1.0.46

5 years ago

1.0.45

5 years ago

1.0.44

6 years ago

1.0.43

6 years ago

1.0.40

6 years ago

1.0.42

6 years ago

1.0.41

6 years ago

1.0.39

6 years ago

1.0.38

6 years ago

1.0.37

6 years ago

1.0.36

6 years ago

1.0.35

6 years ago

1.0.34

6 years ago

1.0.33

6 years ago

1.0.32

6 years ago

1.0.31

6 years ago

1.0.30

6 years ago

1.0.29

6 years ago

1.0.28

6 years ago

1.0.27

6 years ago

1.0.26

6 years ago

1.0.25

6 years ago

1.0.24

6 years ago

1.0.23

6 years ago

1.0.22

6 years ago

1.0.21

6 years ago

1.0.20

6 years ago

1.0.19

6 years ago

1.0.18

6 years ago

1.0.17

6 years ago

1.0.16

6 years ago

1.0.15

6 years ago

1.0.14

6 years ago

1.0.13

6 years ago

1.0.12

6 years ago

1.0.11

6 years ago

1.0.10

6 years ago

1.0.9

6 years ago

1.0.8

6 years ago

1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago