0.0.45 • Published 2 years ago

ez-conf-hillchart v0.0.45

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

ea-conf-hillchart

Quickstart

Add a hillchart to a confluence page by adding this javascript inside of an HTML confluence macro

<script type="module">
import {hillChart} from "https://cdn.skypack.dev/ez-conf-hillchart";
hillChart(
	"Globally unique chart name",
	[
		"point 1",
		"point 2",
		"point 3",
		"Nifty new data point"
	]
);
</script>

Want to add or delete a data point from the chart? Simply change the names passed as the second argument.

hillChart(
	"Globally unique chart name",
	[
	  // deleted	"point 1",
        "A new data point",
		"point 2",
		"point 3",
		"Nifty new data point"
	]
);

Want a 2nd hill chart on the same page? Just add a second call, being sure to use a different name as the first argument.

//...

hillChart(
	"Another globally unique chart name",
	[
        "A very fun task",
        "A very boring task"
	]
);

Chart names SHOULD be globally unique.

The Globally unique chart name is used to create an attachment to the page where the chart state is saved and should truly be globally unique. Don't use the same name for two different hill charts.

// "Globally unique chart name.json" attached to the page.
[... json stuff ... ]

Trouble occurs when fragments of one page, say the hill chart javascript code, is "transcluded" onto another page for display. This is more common than you might realize. Confluence does this to create index pages and dashboards.

When the javascript is "transcluded" across page boundaries, it might run on a page where the json attachment doesn't exist. When that happens, the hill chart javascript code searches for the original attachment so that the original state can be displayed and updated. For this to happen properly, the attachment name needs to be unique within confluence.

Advanced "dot" options

THIS SECTION IS NOT YET ENABLED ON THE PUBLIC API

Want to change the color the dots on your chart?

hillChart(
	"Another globally unique chart name",
	[
        "A very fun task",
        {
            description: "A very boring task",
            color: "red"
        }
	]
);

Want to make a dot linkable?

hillChart(
	"Another globally unique chart name",
	[
        "A very fun task",
        {
            description: "A very boring task",
            color: "red",
            link: "..."
        }
	]
);

Advanced state storage options

Want to explicitly control where your chart state is stored?

import {hillChart, ConfluenceAttachment} from "https://cdn.skypack.dev/ez-conf-hillchart";
hillChart(
   "Globally unique chart name",
   [
      "point 1",
        "A new data point",
      "point 2",
      "point 3",
      "Nifty new data point"
   ],
	new ConfluenceAttachment( "spaceKey", "pageName", "attachmentName (including the .json)" )
);
0.0.47-beta.1

2 years ago

0.0.47-beta.0

2 years ago

0.0.40

3 years ago

0.0.41

3 years ago

0.0.42

3 years ago

0.0.43

3 years ago

0.0.44

3 years ago

0.0.45

3 years ago

0.0.39

3 years ago

0.0.45-beta.0

3 years ago

0.0.38

3 years ago

0.0.37

3 years ago

0.0.36

3 years ago

0.0.35

3 years ago

0.0.34

3 years ago

0.0.33

3 years ago

0.0.32

3 years ago

0.0.31

3 years ago

0.0.30

3 years ago

0.0.29

3 years ago

0.0.28

3 years ago

0.0.27

3 years ago

0.0.26

3 years ago

0.0.25

3 years ago

0.0.24

3 years ago

0.0.23

3 years ago

0.0.22

3 years ago

0.0.21

3 years ago

0.0.20

3 years ago

0.0.19

3 years ago

0.0.18

3 years ago

0.0.17

3 years ago

0.0.16

3 years ago

0.0.15

3 years ago

0.0.14

3 years ago

0.0.13

3 years ago

0.0.12

3 years ago

0.0.11

3 years ago

0.0.10

3 years ago

0.0.9

3 years ago

0.0.8

3 years ago

0.0.7

3 years ago

0.0.6

3 years ago

0.0.5

3 years ago

0.0.4

3 years ago