jquery - Flot change bar opacity on hover -


the default flot bar chart changes opacity:.5 opacity:1 on hover. invert can not seem find has done this. code using.

$.extend(true, opts.flot, {     series: {         points: { show: false },         bars: {             align      : 'center',             order      : (opts.stacked) ? null : true,             show       : true,             border     : false,             fill       : 1,             fillcolor  : null,             horizontal : opts.horizontal,             barwidth   : (opts.stacked) ? 0.6 : 0.6 / opts.data.length,             linewidth  : 0         },         lines: { show: false },         pie: { show: false }     } }); 

use in options give opacity 1 without hover , opacity 0.5 on hover (here red base color):

color: 'rgba(255, 0, 0, 1.0)', highlightcolor: 'rgba(255, 255, 255, 0.5)', bars: {     show: true,     fillcolor: 'rgba(255, 0, 0, 1.0)'             } 

see fiddle full example.


Comments

Popular posts from this blog

OpenCV OpenCL: Convert Mat to Bitmap in JNI Layer for Android -

android - org.xmlpull.v1.XmlPullParserException: expected: START_TAG {http://schemas.xmlsoap.org/soap/envelope/}Envelope -

python - How to remove the Xframe Options header in django? -