struts-community-plugins / struts2-jquery

Struts2 jQuery Plugin
Apache License 2.0
83 stars 49 forks source link

After Update version 5 : The chart legend is black and the legend colors are not displayed #306

Open afattahi54 opened 2 years ago

afattahi54 commented 2 years ago

I don't know if it is jQuery Flot component bug or some thing else.

I have upgrade to version 6, after that the legend area is shown in black

image

This was fixed by below css ( this fix was no necessary in older version)

.legendLayer .background {
    fill: rgba(255, 255, 255, 0.85);
} 

However, after applying this fix , the legend is displayed but the colors are not show near each data.

image

Here is the js:

datapie = [
    {label: "Running",  data: 19.5, color: '#e1ab0b'},
    {label: "Stopped",  data: 4.5, color: '#fe0000'},
    {label: "Terminated",  data: 36.6, color: '#93b40f'}
];

$.plot($("#placeholder"), datapie, {

 series: {
     pie: {show: true,
         label: {show: true}
    }
    },

    legend: {show: true}

});

The desired chart could be found at http://jsfiddle.net/Rnusy/11/

jogep commented 2 years ago

@afattahi54 sounds like a jQuery flot issue to me as it is also reported by others.

https://github.com/flot/flot/issues/1708