@@ -809,7 +809,7 @@ export class D3node {
809809 }
810810}
811811
812- /** Graph utilities */
812+ /**Graph utilities */
813813export const Graph = {
814814 /**Timeline graph */
815815 timeline ( ) {
@@ -825,7 +825,7 @@ export const Graph = {
825825 const margin = { top :10 , left :10 , right :10 , bottom :45 }
826826 const d3n = new D3node ( )
827827 const svg = d3n . createSVG ( width , height )
828-
828+
829829 //Data
830830 const X = data . map ( ( { x} ) => x )
831831 const start = X . at ( 0 )
@@ -855,7 +855,7 @@ export const Graph = {
855855 . style ( "text-anchor" , "end" )
856856 . style ( "font-size" , 20 )
857857 . attr ( "fill" , "rgba(127, 127, 127, .8)" )
858-
858+
859859 //Data range
860860 const y = d3 . scaleLinear ( )
861861 . domain ( [ high , low ] )
@@ -869,7 +869,7 @@ export const Graph = {
869869 . selectAll ( "text" )
870870 . style ( "font-size" , 20 )
871871 . attr ( "fill" , "rgba(127, 127, 127, .8)" )
872-
872+
873873 //Generate graph line
874874 const datum = Y . map ( ( y , i ) => [ X . at ( i ) , y ] )
875875 const tdatum = Y . map ( ( y , i ) => [ X . at ( i ) , y , T [ i ] ] )
@@ -888,7 +888,7 @@ export const Graph = {
888888 . attr ( "fill" , "transparent" )
889889 . attr ( "stroke" , "#87ceeb" )
890890 . attr ( "stroke-width" , 2 )
891-
891+
892892 //Generate graph area
893893 if ( area ) {
894894 svg . append ( "path" )
@@ -904,7 +904,7 @@ export const Graph = {
904904 )
905905 . attr ( "fill" , "rgba(88, 166, 255, .1)" )
906906 }
907-
907+
908908 //Generate graph points
909909 if ( points ) {
910910 svg . append ( "g" )
@@ -917,7 +917,7 @@ export const Graph = {
917917 . attr ( "r" , 2 )
918918 . attr ( "fill" , "#106cbc" )
919919 }
920-
920+
921921 //Generate graph text
922922 if ( text ) {
923923 svg . append ( "g" )
@@ -938,7 +938,7 @@ export const Graph = {
938938 . text ( d => d [ 2 ] ? d [ 2 ] : "" )
939939 . attr ( "fill" , "rgba(127, 127, 127, .8)" )
940940 }
941-
941+
942942 return d3n . svgString ( )
943943 } ,
944944 /**Pie Graph */
@@ -947,7 +947,7 @@ export const Graph = {
947947 const radius = Math . min ( width , height ) / 2
948948 const d3n = new D3node ( )
949949 const svg = d3n . createSVG ( width , height )
950-
950+
951951 //Data
952952 const K = Object . keys ( data )
953953 const V = Object . values ( data )
@@ -958,7 +958,7 @@ export const Graph = {
958958 const arcs = d3 . pie ( ) . padAngle ( 1 / radius ) . sort ( null ) . value ( i => V [ i ] ) ( I )
959959 const arc = d3 . arc ( ) . innerRadius ( 0 ) . outerRadius ( radius )
960960 const labels = d3 . arc ( ) . innerRadius ( radius / 2 ) . outerRadius ( radius / 2 )
961-
961+
962962 svg . append ( "g" )
963963 . attr ( "transform" , `translate(${ width / 2 } ,${ height / 2 } )` )
964964 . attr ( "stroke" , "white" )
0 commit comments