From Dark and Darker Wiki

No edit summary
No edit summary
Line 10: Line 10:
   var data = JSON.parse('<!--{$data|escape:'quotes'}-->')
   var data = JSON.parse('<!--{$data|escape:'quotes'}-->')
   var label = '<!--{$label|escape:'quotes'}-->';
   var label = '<!--{$label|escape:'quotes'}-->';
   var borderColor = '<!--{$borderColor|escape:'quotes'}-->';
   var color = '<!--{$color|escape:'quotes'}-->';
   var backgroundColor = '<!--{$backgroundColor|escape:'quotes'}-->';
   var backgroundColor = '<!--{$backgroundColor|escape:'quotes'}-->';
    
    
   if (borderColor == "") {
   if (color == "") {
     borderColor = "black";
     color = "black";
   }
   }
  if (backgroundColor == "") {
    backgroundColor = "transparent";
  }
 
   var max = data[0]["x"];
   var max = data[0]["x"];
   var min = max;
   var min = max;
Line 44: Line 41:
           data: data,
           data: data,
           label: label,
           label: label,
           borderColor: borderColor,
           borderColor: color,
           backgroundColor: backgroundColor,
           backgroundColor: color,
           fill: false,
           fill: false,
         },
         },
Line 52: Line 49:
   });
   });
    
    
    
   document.getElementById('<!--{$id|escape:'html'}-->').style.backgroundColor = backgroundColor;
    
    
    
    
</script>
</script>
</includeonly>
</includeonly>

Revision as of 05:48, 7 January 2023