Browse Source

markers examples begin

pull/23/head
glitch4347 12 months ago
parent
commit
8346bceedf
  1. 34
      examples/markers.html
  2. 1
      src/models/line_series.ts

34
examples/markers.html

@ -0,0 +1,34 @@
<!DOCTYPE html>
<html>
<head>
<meta content="text/html;charset=utf-8" http-equiv="Content-Type">
<meta content="utf-8" http-equiv="encoding">
<script src="../dist/index.dev.js" type="text/javascript"></script>
</head>
<body>
<div id="chart" style="width: 100%; height: 500px;"></div>
<script type="text/javascript">
const startTime = 1701790172908;
const data = [5, 6, 3, 7, 5, 6, 8, 4, 5, 6, 4, 3, 5, 7, 8]
.map((el, idx) => [startTime + idx * 100, el]);
let options = {
renderLegend: false,
axis: {
y: { range: [0, 10] },
x: { format: 'time' }
},
}
var pod = new LinePod(
document.getElementById('chart'),
[
{ datapoints: data, color: 'black' },
],
options
);
pod.render();
</script>
</body>
</html>

1
src/models/line_series.ts

@ -15,7 +15,6 @@ const LINE_SERIE_DEFAULTS = {
};
export class LineSeries extends CoreSeries<LineTimeSerie> {
constructor(series: LineTimeSerie[]) {
super(series, _.clone(LINE_SERIE_DEFAULTS));
}

Loading…
Cancel
Save