๐Ÿ“ˆ

Graph

This equals to an object that the posted Pixels are displayed in the form of a calendar heatmap, or configuration properties related to its display content.

Related API

There are a total of 9 APIs related to Graph , which can be categorized into the following 3 types:
  1. APIs for creating and deleting Graph and updating their properties
  1. APIs for displaying Graph
  1. APIs for retrieving the other information about Graph

1. APIs for creating and deleting Graph and updating their properties

2. APIs for displaying Graph

3. APIs for retrieving the other information about Graph

Properties and features

Graph has the following properties:
  • id
  • name
  • unit
  • type
  • color
  • timezone
  • selfSufficient
  • isSecret
  • publishOptionalData
  • purgeCacheURLs

id

This is an identifier for uniquely identifying the Graph . You canโ€™t create a Graph that has the same id in a certain User . This is also used as part of the URL when you display a Pixela graph. Additionally, you canโ€™t change this property after.
When pointing to this property in the API document, this is often referred to as <graphID> .

name

This is a property that is expected to be set a name of the Graph . You can confirm its content by GET - /v1/users/<username>/graphs/<graphID>.html, etc.

unit

This property is expected to be set the unit of the quantity posted to the Graph.
For example, it is commits , pages , or kilograms . You can confirm its content by GET - /v1/users/<username>/graphs/<graphID>.html, etc.

type

You need to specify whether the value which is posted to the Graph is an integer or decimal value by setting this property. Additionally, you canโ€™t change this property after.

color

You can specify the color of Pixels associated with the Graph when it is displayed.
You can specify shibafu , momiji , sora , ichou , ajisai , or kuro to this property as its color. How is the color when you specify the each color scheme, please see the following images:
Confirm the color sample of each color scheme
shibafu (่Š็”Ÿ / green)
shibafu (่Š็”Ÿ / green)
momiji (็ด…่‘‰ / red)
momiji (็ด…่‘‰ / red)
sora (็ฉบ / blue)
sora (็ฉบ / blue)
ichou (้Š€ๆ / yellow)
ichou (้Š€ๆ / yellow)
ajisai (็ดซ้™ฝ่Šฑ / purple)
ajisai (็ดซ้™ฝ่Šฑ / purple)
kuro (้ป’ / black)
kuro (้ป’ / black)

timezone

When a Pixel is posted to Graph in one of the following ways, using current date at that time.
By setting the timezone property, you can specify the time zone that is considered when getting the current date.
You can confirm its content by GET - /v1/users/<username>/graphs/<graphID>.html, etc.

selfSufficient

You can specify one of the increment , decrement , or none value to this property.

isSecret

By setting this property, you can specify whether hide the graph or not on the graphs list on your user profile page. Specifying true or false to this property.
However, the feature that hides the graph by setting true is only available to Pixela Supporters. For more detail, please see ๐Ÿ’Make exclusive features available as a benefit of supporting Pixela - Pixela Supporter Program.

publishOptionalData

By setting true to this property, you can make optionalData recorded in each Pixel viewable on the HTML page which GET - /v1/users/<username>/graphs/<graphID>.html returns, and you can have it added as an attribute to a graphโ€™s SVG information.
However, the feature that enables these behaviors by setting true is only available to Pixela Supporters. For more detail, please see ๐Ÿ’Make exclusive features available as a benefit of supporting Pixela - Pixela Supporter Program.
About how to use this feature or for more detail, please see ๐Ÿ’ฌAdd and display an additional information to Pixel.

purgeCacheURLs

When a Pixela graph is embedded on GitHub, the image is cached in GitHub automatically. If you want to clear the cache every updating the graph, you can do it by setting the cached image URL to this property.
For more detail, please see Embedding Pixela graphs in GitHub.

Specifications

  • When you delete a Graph , all data, such as pixels, associated with it also will be deleted.

Notes

  • If you donโ€™t explicitly specify timezone , itโ€™s treated as UTC.
  • What by using isSecret property is only making the graph removed from a graph list content.
  • The only thing you can do with the isSecret property is to remove the graph from a graph list content. You canโ€™t prevent access to the graph by specifying URL directly.

Related links