import { Chart , SVGMark , PlotArea , Circle , Rect , Area , Line , Arc , Node , Link , Text , } from '@thematic/core' ; import { Selection } from 'd3-selection' ; export function svg ( selection , child ) { return selection . attr ( 'fill' , child . backgroundColor ( ) . hex ( ) ) ; } param selection param child function mark ( selection , child ) { return selection . attr ( 'fill' , d => child . fill ( d ) . hex ( ) ) . attr ( 'fill-opacity' , d => child . fillOpacity ( d ) ) . attr ( 'stroke' , d => child . stroke ( d ) . hex ( ) ) . attr ( 'stroke-opacity' , d => child . strokeOpacity ( d ) ) . attr ( 'stroke-width' , d => child . strokeWidth ( d ) ) ; } param selection param child export function rect ( selection , child ) { return selection . call ( mark , child ) ; } param selection param child export function circle ( selection , child ) { return selection . attr ( 'r' , d => child . radius ( d ) ) . call ( mark , child ) ; } param selection param child export function line ( selection , child ) { return selection . call ( mark , child ) ; } param selection param child export function text ( selection , child ) { return selection . attr ( 'font-size' , child . fontSize ( ) ) . attr ( 'font-family' , child . fontFamily ( ) ) . call ( mark , child ) ; } param selection param child export function path ( selection , child ) { return selection . call ( mark , child ) ; }