File tree Expand file tree Collapse file tree 1 file changed +50
-0
lines changed
src/wrappers/components/data-vis/line-chart Expand file tree Collapse file tree 1 file changed +50
-0
lines changed Original file line number Diff line number Diff line change 385
385
.map ((el ) => el .x ),
386
386
),
387
387
},
388
+ {
389
+ name: " xFunction" ,
390
+ category: " xScale" ,
391
+ functionElements: {
392
+ functionAsString: ` function (number) {
393
+ return {
394
+ "scaleLinear()": scaleLinear(),
395
+ "scaleLog()": scaleLog(),
396
+ "scaleTime()": scaleTime(),
397
+ }[getValue("xScaleType")]
398
+ .domain([getValue("xDomainLowerBound"), getValue("xDomainUpperBound")])
399
+ .range([
400
+ 0,
401
+ demoScreenWidth - getValue("paddingLeft") - getValue("paddingRight"),
402
+ ])(number);
403
+ });` ,
404
+ },
405
+ },
406
+ {
407
+ name: " yFunction" ,
408
+ category: " yScale" ,
409
+ functionElements: {
410
+ functionAsString: ` function (number) {
411
+ return {
412
+ "scaleLinear()": scaleLinear(),
413
+ "scaleLog()": scaleLog(),
414
+ "scaleTime()": scaleTime(),
415
+ }[getValue("yScaleType")]
416
+ .domain([getValue("yDomainLowerBound"), getValue("yDomainUpperBound")])
417
+ .range([
418
+ getValue("svgHeight") -
419
+ getValue("paddingTop") -
420
+ getValue("paddingBottom"),
421
+ 0,
422
+ ])(number);
423
+ });` ,
424
+ },
425
+ },
426
+ {
427
+ name: " yScaleType" ,
428
+ category: " yScale" ,
429
+ isProp: false ,
430
+ options: [" scaleLinear()" , " scaleLog()" , " scaleTime()" ],
431
+ },
432
+ {
433
+ name: " xScaleType" ,
434
+ category: " xScale" ,
435
+ isProp: false ,
436
+ options: [" scaleLinear()" , " scaleLog()" , " scaleTime()" ],
437
+ },
388
438
]),
389
439
);
390
440
You can’t perform that action at this time.
0 commit comments