jquery - Css : move the information frame below the graph -
i have graph :
i framed information in red.
and graph this, information frame:
you can see information below graph.
here css :
/*plugin styles*/ .visualize { border: 1px solid #888; position: relative; background: #fafafa; margin-left :100px} .visualize canvas { position: absolute;} .visualize ul,.visualize li { margin: 0; padding: 0;} /*table title, key elements*/ .visualize .visualize-info { padding: -30px 5px; background: #fafafa; border: 1px solid #888; position: absolute; opacity: .6; margin-left:10px } .visualize .visualize-title { display: block; color: #333; margin-bottom: 3px; font-size: 1.1em; } .visualize ul.visualize-key { list-style: none; } .visualize ul.visualize-key li { list-style: none; float: left; margin-right: 10px; padding-left: 10px; position: relative;} .visualize ul.visualize-key .visualize-key-color { width: 6px; height: 6px; left: 0; position: absolute; top: 50%; margin-top: -3px; } .visualize ul.visualize-key .visualize-key-label { color: #000; } /*pie labels*/ .visualize-pie .visualize-labels { list-style: none; } .visualize-pie .visualize-label-pos, .visualize-pie .visualize-label { position: absolute; margin: 0; padding:0; } .visualize-pie .visualize-label { display: block; color: #fff; font-weight: bold; font-size: 1em; } .visualize-pie-outside .visualize-label { color: #000; font-weight: normal; } /*line,bar, area labels*/ .visualize-labels-x,.visualize-labels-y { position: absolute; left: 0; top: 0; list-style: none; } .visualize-labels-x li, .visualize-labels-y li { position: absolute; bottom: 0; } .visualize-labels-x li span.label, .visualize-labels-y li span.label { position: absolute; color: #555; } .visualize-labels-x li span.line, .visualize-labels-y li span.line { position: absolute; border: 0 solid #ccc; } .visualize-labels-x li { height: 100%; } .visualize-labels-x li span.label { top: 100%; margin-top: 5px; } .visualize-labels-x li span.line { border-left-width: 1px; height: 100%; display: block; } .visualize-labels-x li span.line { border: 0;} /*hide vertical lines on area, line, bar*/ .visualize-labels-y li { width: 100%; } .visualize-labels-y li span.label { right: 100%; margin-right: 5px; display: block; width: 100px; text-align: right; } .visualize-labels-y li span.line { border-top-width: 1px; width: 100%; } .visualize-bar .visualize-labels-x li span.label { width: 100%; text-align: center; }
html code :
<!doctype html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <title></title> <link type="text/css" rel="stylesheet" href="css/jquery.visualize.plugin.css" /> </head> <body> <table id="table_statistic_3" class="display"> <caption style="font-size: 20px">test</caption> <thead> </thead> <tbody> </tbody> </table> </body> </html>
in javascript, did
$('table').visualize({ type: 'line' });
atfer filling datatables load in table.
here html code generated (part of info) :
<div class="visualize-info"> <div class="visualize-title">omzetcijfer per productgroep</div> <ul class="visualize-key"> <li> <span class="visualize-key-color" style="background: #be1e2d"></span> <span class="visualize-key-label">urology</span> </li> <li> <span class="visualize-key-color" style="background: #666699"></span> <span class="visualize-key-label">procto</span> </li> <li> <span class="visualize-key-color" style="background: #92d5ea"></span> <span class="visualize-key-label">pneumo</span> </li> <li> <span class="visualize-key-color" style="background: #ee8310"></span> <span class="visualize-key-label">overigen</span> </li> <li> <span class="visualize-key-color" style="background: #8d10ee"></span> <span class="visualize-key-label">niet van toepassing</span> </li> <li> <span class="visualize-key-color" style="background: #5a3b16"></span> <span class="visualize-key-label">gastro</span> </li> <li> <span class="visualize-key-color" style="background: #26a4ed"></span> <span class="visualize-key-label"> nog niet bepaald</span> </li> <li> <span class="visualize-key-color" style="background: #f45a90"></span> <span class="visualize-key-label"></span> </li> </ul> </div> </div>
Comments
Post a Comment