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
license: gpl-3.0 | |
redirect: https://observablehq.com/@d3/diverging-bar-chart |
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
// d3.js drop shadow example | |
// put together by http://charlbotha.com/ | |
var items = [ | |
{x : 50, y : 10}, | |
{x : 100, y: 170}, | |
{x : 320, y: 70} | |
]; | |
// we can increase this, everything will scale up with us |
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
export function logger( reducer ) { | |
return function newReducer( state, action ) { | |
console.group(action.type); | |
const nextState = reducer(currentState, action); | |
console.log(`%c prev state`, `color: #9E9E9E; font-weight: bold`, state); | |
console.log(`%c action`, `color: #03A9F4; font-weight: bold`, action); | |
console.log(`%c next state`, `color: #4CAF50; font-weight: bold`, nextState); | |
console.groupEnd(); | |
return nextState; | |
} |
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
'use strict'; | |
/*****************NATIVE forEACH*********************/ | |
Array.prototype.myEach = function(callback) { | |
for (var i = 0; i < this.length; i++) | |
callback(this[i], i, this); | |
}; | |
//tests |
I’m looking forward to the Sass Fundamentals workshop! A few notes to ensure you’re set up in advance are below.
See you soon!
Mike
You’ll need a relatively recent version (v4.5 or newer, v7 ideally) of node.js installed. On OS X, a great way of doing this without disturbing your existing dev environment is to install NVM. Installation instructions are here.
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
/* 13. Basic Styling with CSS */ | |
/* Style the lines by removing the fill and applying a stroke */ | |
::ng-deep .line { | |
fill: none; | |
stroke: #ffab00; | |
stroke-width: 3; | |
} | |
::ng-deep .overlay { |
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
import { Component, OnInit, ViewChild, ElementRef } from '@angular/core'; | |
import * as d3 from "d3"; | |
@Component({ | |
selector: 'app-line-chart', | |
templateUrl: './line-chart.component.html', | |
styleUrls: ['./line-chart.component.scss'] | |
}) | |
export class LineChartComponent implements OnInit { |
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
<svg #chart class="chart"></svg> |
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
import { Module, Global, DynamicModule } from '@nestjs/common' | |
import { EnvModule } from './env.module' | |
import { EnvService } from './env.service' | |
import { TypeOrmModule } from '@nestjs/typeorm' | |
function DatabaseOrmModule (): DynamicModule { | |
const config = new EnvService().read() | |
return TypeOrmModule.forRoot({ | |
type: config.DB_TYPE, |