You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
mohemmionic5/Mohem/src/app/hmg-common/ui/graph/graph.component.ts

45 lines
1013 B
TypeScript

import { Component, OnInit, Input } from '@angular/core';
import * as shape from 'd3-shape';
import * as d3 from 'd3';
import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service';
@Component({
selector: 'graph',
templateUrl: './graph.component.html',
styleUrls: ['./graph.component.scss']
})
export class GraphComponent implements OnInit {
view: any[] = [0, 0];
// options
showXAxis = true;
showYAxis = true;
gradient = true;
showLegend = false;
showXAxisLabel = true;
xAxisLabel = 'Number';
showYAxisLabel = true;
yAxisLabel = 'Color Value';
curve = shape.curveNatural;
// curve = shape.curveLinear;
// curve = shape.curveBasis;
// curve = shape.curveBundle.beta(1.0);
timeline = true;
legendTitle = '';
colorScheme = {
domain: ['#3880ff' , '#5AA454' , '#A10A28', '#C7B42C', '#AAAAAA']
};
@Input() data: any[] ;
constructor(
public ts: TranslatorService
) { }
ngOnInit() {
}
public selected(event: any) { }
}