Skip to content

Instantly share code, notes, and snippets.

View jplemieux66's full-sized avatar

Jean-Philippe Lemieux jplemieux66

View GitHub Profile
app-bar-chart {
#chart {
height: inherit;
width: inherit;
.bar {
fill: steelblue;
}
.bar:hover {
app-bar-chart {
.bar {
fill: steelblue;
}
.bar:hover {
fill: brown;
}
.axis--x path {
import { Component, ElementRef, Input, OnChanges, ViewChild, ViewEncapsulation } from '@angular/core';
import * as d3 from 'd3';
import { DataModel } from 'src/app/data/data.model';
@Component({
selector: 'app-bar-chart',
encapsulation: ViewEncapsulation.None,
templateUrl: './bar-chart.component.html',
styleUrls: ['./bar-chart.component.scss']
})
import { HttpClient } from '@angular/common/http';
import { Component } from '@angular/core';
import { Observable } from 'rxjs';
import { DataModel } from 'src/data/data.model';
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css']
})
[
{
"letter": "A",
"frequency": 0.08167
},
{
"letter": "B",
"frequency": 0.01492
},
{
import { ActionReducerMap, createFeatureSelector, createSelector } from '@ngrx/store';
import * as fromRoot from '../../reducers';
import * as fromDates from './dates';
import * as fromProjects from './projects';
export interface ProjectsState {
dates: fromDates.State;
projects: fromProjects.State;
}
import { ProjectsDetails } from '../../../shared/model/user-projects-details';
import * as actions from './../actions/projects';
export interface State extends ProjectsDetails {
error: any;
}
export const initialState: State = {
projects: [],
projectsUsers: [],
this.store.dispatch(new LoadProjectsDetails(this.userId));
import { Injectable } from '@angular/core';
import { Actions, Effect } from '@ngrx/effects';
import { Action } from '@ngrx/store';
import { Observable, of } from 'rxjs';
import * as project from './../actions/projects';
import { ProjectsService } from './../services/projects.service';
@Injectable()
export class ProjectEffects {
import { Injectable } from '@angular/core';
import { Actions } from '@ngrx/effects';
import { ProjectsService } from './../services/projects.service';
@Injectable()
export class ProjectEffects {
constructor(private actions$: Actions,
private projectsService: ProjectsService) { }
}