7
7
*/
8
8
9
9
export default function Segment ( globalRoot , Chartist ) {
10
- console . log ( "trying to generate chart" ) ;
11
- // var window = globalRoot.window;
12
- // var document = globalRoot.document;
13
-
14
10
/**
15
11
* Default options in line charts. Expand the code view to see a detailed list of options with comments.
16
12
*
@@ -175,7 +171,7 @@ export default function Segment (globalRoot, Chartist){
175
171
meta : Chartist . getMetaData ( segment , valueIndex ) // value.meta// Chartist.getMetaData(series, valueIndex)
176
172
} ) ;
177
173
} ) ;
178
- console . log ( pathCoordinates , pathData ) ;
174
+ // console.log(pathCoordinates, pathData);
179
175
180
176
}
181
177
@@ -254,8 +250,8 @@ export default function Segment (globalRoot, Chartist){
254
250
segParent = { seriesElement, rect :chartRect , axisX, axisY, data, seriesIndex} ;
255
251
//segments.forEach( (seg, index) => drawSegment (seg, index, segParent));
256
252
//data.normalized.series[seriesIndex].forEach(function(value, valueIndex) {
257
- console . log ( segments ) ;
258
- let testCase ;
253
+ // console.log(segments);
254
+ // let testCase;
259
255
// use arrow function to avoid binding `this`; segments aren't proper chartist objs
260
256
segments . forEach ( function makeSegElements ( segment , segmentIndex ) {
261
257
//console.log("seg name is defined?");
@@ -266,8 +262,8 @@ export default function Segment (globalRoot, Chartist){
266
262
'ct:series-name' : series . name
267
263
//'ct:meta': Chartist.serialize(series.meta) // no meta data for this yet
268
264
} ) ;
269
- segment . points [ 0 ] === testCase ? console . log ( `oh no! first element of segment ${ segmentIndex } = the one before` ) : testCase = segment . points [ 0 ] ;
270
- console . log ( testCase ) ;
265
+ // segment.points[0] === testCase ? console.log(`oh no! first element of segment ${segmentIndex} = the one before`) : testCase = segment.points[0];
266
+ // console.log(testCase);
271
267
// Use series class from series data or if not set generate one
272
268
segmentElement . addClass ( [
273
269
options . segmentClassPrefix + segment . name ,
@@ -306,7 +302,7 @@ export default function Segment (globalRoot, Chartist){
306
302
// Interpolating path where pathData will be used to annotate each path element so we can trace back the original
307
303
// index, value and meta data
308
304
var segmentPath = smoothing ( segmentPathCoordinates , segmentPathData ) ;
309
- console . log ( `SEGMENT PATH ELEMTNST HAS LENGTH ${ segmentPath . pathElements . length } ` )
305
+ // console.log(`SEGMENT PATH ELEMTNST HAS LENGTH ${segmentPath.pathElements.length}`)
310
306
// If we should show points we need to create them now to avoid secondary loop
311
307
// Points are drawn from the pathElements returned by the interpolation function
312
308
// Small offset for Firefox to render squares correctly
@@ -322,7 +318,7 @@ export default function Segment (globalRoot, Chartist){
322
318
'ct:value' : [ pathElement . data . value . x , pathElement . data . value . y ] . filter ( Chartist . isNumeric ) . join ( ',' ) ,
323
319
'ct:meta' : Chartist . serialize ( pathElement . data . meta )
324
320
} ) ;
325
- if ( index == 2 ) { ( console . log ( "2!!!!" , pathElement . data . meta . direction ) ) }
321
+ // if (index == 2) {(console.log("2!!!!", pathElement.data.meta.direction))}
326
322
this . eventEmitter . emit ( 'draw' , {
327
323
type : 'point' ,
328
324
value : pathElement . data . value ,
0 commit comments