-
Notifications
You must be signed in to change notification settings - Fork 192
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
18 changed files
with
3,326 additions
and
1,541 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -84,6 +84,7 @@ a.github-logo { | |
|
||
nz-content { | ||
margin: 24px; | ||
overflow-y: scroll; | ||
} | ||
|
||
.inner-content { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
src/app/pages/demo-series/series-heatmap/heatmap-calendar/heatmap-calendar.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<!-- DEMO START --> | ||
<div echarts [options]="options" class="demo-chart"></div> | ||
<!-- DEMO END --> | ||
|
||
<app-code-block [html]="html" [component]="component"> </app-code-block> |
Empty file.
70 changes: 70 additions & 0 deletions
70
src/app/pages/demo-series/series-heatmap/heatmap-calendar/heatmap-calendar.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
import { Component, OnInit } from '@angular/core'; | ||
import * as echarts from 'echarts'; | ||
import type { EChartsOption } from 'echarts'; | ||
// IGNORE START | ||
declare const require: any; | ||
// IGNORE END | ||
|
||
@Component({ | ||
selector: 'app-heatmap-calendar', | ||
templateUrl: './heatmap-calendar.component.html', | ||
styleUrl: './heatmap-calendar.component.scss', | ||
}) | ||
export class HeatmapCalendarComponent implements OnInit { | ||
// IGNORE START | ||
html = | ||
require('!!html-loader?{"minimize": {"removeComments":false,"caseSensitive":true}}!./heatmap-calendar.component.html') | ||
.default; | ||
component = require('!!raw-loader!./heatmap-calendar.component.ts').default; | ||
// IGNORE END | ||
options: EChartsOption; | ||
|
||
ngOnInit(): void { | ||
this.options = { | ||
title: { | ||
top: 30, | ||
left: 'center', | ||
text: 'Daily Step Count', | ||
}, | ||
tooltip: {}, | ||
visualMap: { | ||
min: 0, | ||
max: 10000, | ||
type: 'piecewise', | ||
orient: 'horizontal', | ||
left: 'center', | ||
top: 65, | ||
}, | ||
calendar: { | ||
top: 120, | ||
left: 30, | ||
right: 30, | ||
cellSize: ['auto', 13], | ||
range: '2016', | ||
itemStyle: { | ||
borderWidth: 0.5, | ||
}, | ||
yearLabel: { show: false }, | ||
}, | ||
series: { | ||
type: 'heatmap', | ||
coordinateSystem: 'calendar', | ||
data: this.getVirtualData('2016'), | ||
}, | ||
}; | ||
} | ||
|
||
getVirtualData(year: string) { | ||
const date = +echarts.time.parse(year + '-01-01'); | ||
const end = +echarts.time.parse(+year + 1 + '-01-01'); | ||
const dayTime = 3600 * 24 * 1000; | ||
const data: [string, number][] = []; | ||
for (let time = date; time < end; time += dayTime) { | ||
data.push([ | ||
echarts.time.format(time, '{yyyy}-{MM}-{dd}', false), | ||
Math.floor(Math.random() * 10000), | ||
]); | ||
} | ||
return data; | ||
} | ||
} |
5 changes: 5 additions & 0 deletions
5
src/app/pages/demo-series/series-heatmap/heatmap-discrete/heatmap-discrete.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<!-- DEMO START --> | ||
<div echarts [options]="options" class="demo-chart"></div> | ||
<!-- DEMO END --> | ||
|
||
<app-code-block [html]="html" [component]="component"> </app-code-block> |
Empty file.
Oops, something went wrong.