@microsoft/teams.cards
Version:
<p> <a href="https://www.npmjs.com/package/@microsoft/teams.cards" target="_blank"> <img src="https://img.shields.io/npm/v/@microsoft/teams.cards" /> </a> <a href="https://www.npmjs.com/package/@microsoft/teams.cards?activeTab=code" ta
97 lines (94 loc) • 1.66 kB
JavaScript
'use strict';
var base = require('../base');
class LineChart extends base.Element {
type;
/**
* the title of the chart.
*/
title;
/**
* the color to use for all data points.
*/
color;
/**
* the name of the set of colors to use.
*/
colorSet;
/**
* the data to display in the chart.
*/
data;
constructor(...data) {
super();
this.type = "Chart.Line";
this.data = data;
}
withOptions(value) {
Object.assign(this, value);
return this;
}
withTitle(value) {
this.title = value;
return this;
}
withColorSet(value) {
this.colorSet = value;
return this;
}
addData(...data) {
this.data.push(...data);
return this;
}
}
class LineChartData {
/**
* the color to use for the data point.
*/
color;
/**
* the legend of the chart.
*/
legend;
/**
* the data points in the series.
*/
values;
constructor(...dataPoints) {
this.values = dataPoints;
}
withOptions(value) {
Object.assign(this, value);
return this;
}
withColor(value) {
this.color = value;
return this;
}
withLegend(value) {
this.legend = value;
return this;
}
addDataPoints(...value) {
this.values.push(...value);
return this;
}
}
class LineChartDataPoint {
/**
* the x axis value of the data point.
*/
x;
/**
* the y axis value of the data point.
*/
y;
constructor(x, y) {
this.x = x;
this.y = y;
}
}
exports.LineChart = LineChart;
exports.LineChartData = LineChartData;
exports.LineChartDataPoint = LineChartDataPoint;
//# sourceMappingURL=line.js.map
//# sourceMappingURL=line.js.map