File tree 1 file changed +0
-22
lines changed
1 file changed +0
-22
lines changed Original file line number Diff line number Diff line change @@ -26,27 +26,6 @@ import parseConfig from "./parse-config";
26
26
27
27
const componentName = isProduction ? "plotly-graph" : "plotly-graph-dev" ;
28
28
29
- const isNumber = ( y : any ) => ! Number . isNaN ( parseFloat ( y ) ) ;
30
-
31
- function patchLonelyDatapoints ( xs : Datum [ ] , ys : Datum [ ] ) {
32
- /* Ghost traces when data has single numeric value sandwiched between unavailable, unknown, etc ones
33
- Plotly issue: https://github.com/plotly/plotly.js/issues/6407
34
- see: https://github.com/dbuezas/lovelace-plotly-graph-card/issues/103
35
- and: https://github.com/dbuezas/lovelace-plotly-graph-card/issues/124
36
- */
37
- if ( ys . length === 1 ) {
38
- // A single lonely point won't create ghosts, and this fix breaks bar charts with a single bar
39
- // see: https://github.com/dbuezas/lovelace-plotly-graph-card/issues/129#issuecomment-1312730979
40
- return ;
41
- }
42
- for ( let i = 0 ; i < ys . length ; i ++ ) {
43
- if ( ! isNumber ( ys [ i - 1 ] ) && isNumber ( ys [ i ] ) && ! isNumber ( ys [ i + 1 ] ) ) {
44
- ys . splice ( i , 0 , ys [ i ] ) ;
45
- xs . splice ( i , 0 , xs [ i ] ) ;
46
- }
47
- }
48
- }
49
-
50
29
function extendLastDatapointToPresent (
51
30
xs : Datum [ ] ,
52
31
ys : Datum [ ] ,
@@ -489,7 +468,6 @@ export class PlotlyGraph extends HTMLElement {
489
468
console . error ( e ) ;
490
469
}
491
470
}
492
- patchLonelyDatapoints ( xs , ys ) ;
493
471
494
472
if ( xs . length === 0 && ys . length === 0 ) {
495
473
/*
You can’t perform that action at this time.
0 commit comments