Charting
Example
"chart": {
"timeSeries": "GGGG-ww; YYYY-MM-DD; P1W",
"c3":{
"size.height": 200,
"data.types.d0": "bar",
"data.types.d1": "line",
"axis.x.tick.format": "* %M * %d",
"data.labels.format": ".1n",
"data.axes.d0": "y",
"data.axes.d1": "y2",
"axis.y2.show": true
}
}
Syntax
- chart
- timeSeries: expression; middle should be YYYY-MM-DD (if time series)
- single: true (if single value)
- groupBy: metric or $user
- title
- c3: chart options
- "data.type": bar | line | spline
Date format
Uses d3 date formatting.
Returns a new formatter for the given string specifier. The specifier string may contain the following directives:
- %a - abbreviated weekday name.*
- %A - full weekday name.*
- %b - abbreviated month name.*
- %B - full month name.*
- %c - the locale’s date and time, such as %x, %X.*
- %d - zero-padded day of the month as a decimal number [01,31].
- %e - space-padded day of the month as a decimal number [ 1,31]; equivalent to %_d.
- %f - microseconds as a decimal number [000000, 999999].
- %g - ISO 8601 week-based year without century as a decimal number [00,99].
- %G - ISO 8601 week-based year with century as a decimal number.
- %H - hour (24-hour clock) as a decimal number [00,23].
- %I - hour (12-hour clock) as a decimal number [01,12].
- %j - day of the year as a decimal number [001,366].
- %m - month as a decimal number [01,12].
- %M - minute as a decimal number [00,59].
- %L - milliseconds as a decimal number [000, 999].
- %p - either AM or PM.*
- %q - quarter of the year as a decimal number [1,4].
- %Q - milliseconds since UNIX epoch.
- %s - seconds since UNIX epoch.
- %S - second as a decimal number [00,61].
- %u - Monday-based (ISO 8601) weekday as a decimal number [1,7].
- %U - Sunday-based week of the year as a decimal number [00,53].
- %V - ISO 8601 week of the year as a decimal number [01, 53].
- %w - Sunday-based weekday as a decimal number [0,6].
- %W - Monday-based week of the year as a decimal number [00,53].
- %x - the locale’s date, such as * %-m/ %-d/ %Y.*
- %X - the locale’s time, such as * %-I: %M: %S * %p.*
- %y - year without century as a decimal number [00,99].
- %Y - year with century as a decimal number, such as 1999.
- %Z - time zone offset, such as -0700, -07:00, -07, or Z.
- % % - a literal percent sign ( %).