📈
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:- APIs for creating and deleting
Graph
and updating their properties
- APIs for displaying
Graph
- APIs for retrieving the other information about
Graph
1. APIs for creating and deleting Graph
and updating their properties
- POST - /v1/users/<username>/graphs
- This is an API for creating a new
Graph
.
- PUT - /v1/users/<username>/graphs/<graphID>
- This is an API for updating an existing
Graph
.
- DELETE - /v1/users/<username>/graphs/<graphID>
- This is an API for deleting an existing
Graph
.
2. APIs for displaying Graph
- GET - /v1/users/<username>/graphs/<graphID>
- This is an API for getting Pixels associated with a
Graph
as an SVG image in calendar heatmap format. - Relates:
- GET - /v1/users/<username>/graphs/<graphID>.html
- This is an API that returns an HTML page where you can list various information about the
Graph
. This API is expected to be requested by a web browser. - Relates:
3. APIs for retrieving the other information about Graph
- GET - /v1/users/<username>/graphs
- This is an API for retrieving an array of the definition of the registered Graphs.
- GET - /v1/users/<username>/graphs/<graphID>/pixels
- This is an API for retrieving the Pixels are registered to
Graph
which specified by<graphID>
.
- GET - /v1/users/<username>/graphs/<graphID>/stats
- This is an API for retrieving the statistics of the
Graph
specified by<graphID>
.
- GET - /v1/users/<username>/graphs/<graphID>/graph-def
- This is an API for retrieving the definition of the
Graph
specified by<graphID>
.
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.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)
momiji
(紅葉 / red)
sora
(空 / blue)
ichou
(銀杏 / yellow)
ajisai
(紫陽花 / purple)
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.selfSufficient
You can specify one of the
increment
, decrement
, or none
value to this property.About how to use this property, please see Measuring and visualizing page views on your website with Pixela.
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.
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.