Bookmark and share:
Bookmark with delicious tweet this site Post to Google Buzz! Post to Facebook Share on FriendFeed Stumble! this site

RGraph: HTML5 canvas graph library - Available CSS classes

This is information about the CSS classes available to you to allow you to customise the appearance of tooltips and context menus.


 

RGraph_png

This controls the appearance of the PNG image which is shown when you use the context menu option RGraph.showPNG().


 

RGraph_palette

This controls the appearance of the mini-palette that can be used with annotating.


 

RGraph_tooltip

This controls the appearance of tooltips. The default is to have them look like Windows tooltips.


 

RGraph_contextmenu

This controls how context menus appear. The default is similar to the look that Windows XP has.


 

RGraph_contextmenu_item

This controls how individual items on the context menu will appear, for example the default has roughly 25px padding-left to accomodate the left bar.


 

RGraph_contextmenu_background

This is the Windows XP style left vertical bar. By default this is light grey.


 

RGraph_zoom_window

This is the class to use if you want to customise the mini-zoom window.


 

RGraph_zoomed_canvas

This is the class to use if you want to customise the full canvas zoom.


 

RGraph_zoomed_area

This is the class to use if you want to customise the zoomed area.


 

ModalDialog_background

This class controls the dark semi-opaque background for the ModalDialog.


 

ModalDialog_dialog

This class controls the ModalDialog itself.


 

ModalDialog_topbar

This class controls the top bar for the ModalDialog. You could, for example, use the display CSS property to hide this if you don't want it.


 

Example usage

Here is an example of using the CSS classes. At the time of writing, some of the items here were only implemented in newer web browsers:

<style>
    .RGraph_png {
    }

    .RGraph_palette {
    }

    .RGraph_tooltip {
    }
    
    .RGraph_contextmenu {
    }
    
    .RGraph_contextmenu_background {
    }
    
    .RGraph_contextmenu_item {
    }
    
    .RGraph_zoom_window {
    }
    
    .RGraph_zoomed_canvas {
    }
    
    .RGraph_zoomed_area {
    }
    
    .ModalDialog_background {
    }
    
    .ModalDialog_dialog {
    }
    
    .ModalDialog_topbar {
    }
</style>

 

! important

If you're attempting to override default styles, then because of the ordering (ie the script is setting the style AFTER your own CSS) you may need to use the "! important" modifier.