Home Analyst Portal

Transparent dashboard chart background through CSS?

Gabriel_LencesGabriel_Lences Customer Advanced IT Monkey ✭✭✭

Hey guys,

does anyone know which lines of .css to edit to make the dashboard chart white area be transparent with the page background? Can't seem to get my head around it. Thanks! :)


Answers

  • Shane_WhiteShane_White Cireson Support Super IT Monkey ✭✭✭✭✭

    Hi @Gabriel_Lences,

    You cannot change it via CSS because it is a Kendo Chart it the background color is defined in the options, therefore you have to tackle it via custom.js, here is an example you can give a go:

    $( document ).ready(function() {

    setTimeout(function(){

    var charts = $('.k-chart');

    charts.each(function() {

    var kendoChart = $(this).data("kendoChart");

    var options = kendoChart.options;

    var chartArea = {chartArea:{ background: "#ffffff00"}};

    kendoChart.setOptions(chartArea);

    });

    }, 3000);

    });

    Thanks,

    Shane

  • Gabriel_LencesGabriel_Lences Customer Advanced IT Monkey ✭✭✭

    Hey Shane, thanks for the info. I thought this would have to be handled through .js , just asked out of curiousity to see if it's possible through css as well.

    I've tried out the code, unfortunately doesn't seem to be working for me 😔

  • Shane_WhiteShane_White Cireson Support Super IT Monkey ✭✭✭✭✭

    Unfortunately not through CSS as like I said the colour is defined in the kendo widget settings.

    Do you get any errors in the dev tools? Did you put in just into custom.js or loadscript it in?

Sign In or Register to comment.