Skip to main content

Line Chart

info

For all component features for this component, click Line Chart page.
For plugin usage of this component, click Chart Data Labels page.

Props

AttributeDescriptionTypeDescription
xTypeFor Time Cartesian Axis use 'time'istring
xMinThe minimum item to display.string
xMaxThe maximum item to display.string
xTimeDisplayFormatsMillisecondSets how different time units are displayed.string"h:mm:ss.SSS aaaa"
xTimeDisplayFormatsSecondSets how different time units are displayed.string"h:mm:ss aaaa"
xTimeDisplayFormatsMinuteSets how different time units are displayed.string"h:mm aaaa"
xTimeDisplayFormatsHourSets how different time units are displayed.string"ha"
xTimeDisplayFormatsDaySets how different time units are displayed.string"MMM d"
xTimeDisplayFormatsWeekSets how different time units are displayed.string"PP"
xTimeDisplayFormatsMonthSets how different time units are displayed.string"MMM yyyy"
xTimeDisplayFormatsQuarterSets how different time units are displayed.string"qqq - yyyy"
xTimeDisplayFormatsYearSets how different time units are displayed.string"yyyy"
xTimeIsoWeekdayIf boolean and true and the unit is set to 'week', then the first day of the week will be Monday. Otherwise, it will be Sunday. If number, the index of the first day of the week (0 - Sunday, 6 - Saturday)boolean or number
xTimeParserCustom parser for datesstring
xTimeRoundIf defined, dates will be rounded to the start of this unit.string
xTimeTooltipFormatThe format string to use for the tooltip.string
xTimeUnitIf defined, will force the unit to be a certain type. See Time Units section below for details.string.
xTimeMinUnitThe minimum display format to be used for a time unit.string'millisecond'
xTicksColorColor of X ticks.string
xTicksFontFamilyFont Family of X ticks. Default font family for all text.string
xTicksFontSizeFont Size of X ticks. Default font size (in px) for text. Does not apply to radialLinear scale point labels.string12
xTicksFontStyleFont Style of X ticks. Default font style. Does not apply to tooltip title or footer. Does not apply to chart title.string'normal'
xTicksFontWeightFont Weight of X ticks. Default font weight (boldness).string'normal'
xTicksFontLineHeightFont Line Height of X ticks. Height of an individual line of text.string'1.2'
yTicksColorColor of Y ticks.string
yTicksFontFamilyFont Family of Y ticks. Default font family for all text.string
yTicksFontSizeFont Size of Y ticks. Default font size (in px) for text. Does not apply to radialLinear scale point labels.string12 .
yTicksFontStyleFont Style of Y ticks. Default font style. Does not apply to tooltip title or footer. Does not apply to chart title.string'normal'
yTicksFontWeightFont Weight of Y ticks. Default font weight (boldness).string'normal'
yTicksFontLineHeightFont Line Height of Y ticks. Height of an individual line of text.string'1.2'

Samples Component

Line Chart and Data Labels Usage

All of the component features(except options) can be use in this component www.chartjs.org.

All of the Chart Data Labels plugin features can be use in this component.

image

image

image

image

Time Cartesian Axis

Axes that follow a cartesian grid are known as 'Cartesian Axes'. Cartesian axes are used for line and bar charts. Time cartesian axes are included in Chart.js by default.

The time scale is used to display times and dates. Data are spread according to the amount of time between data points. When building its ticks, it will automatically calculate the most comfortable unit base on the size of the scale.

For More Information:

Time Cartesian Axis
Time Display Formats

image

Tooltip Label

tooltipLabel(context) event added to Charts component. Returns text to render for an individual item in the tooltip. The label can change the text that displays for a given data point.

For more detail Charts tooltip-callbacks

quick.return(context.formattedValue + " - " + context.label);

Ticks Font

Samples Qjson

LineChart.qjson
LineChart_Type_Time_Sample.qjson
Charts_Custom_Legend_Sample.qjson
Charts_tooltipLabel_sample.qjson