Image Formats
Using images on nodes, labels and glyphs is a powerful way to customise charts. KeyLines supports the most popular image formats, including PNG, JPG and SVG, as well as font icons.
SVG support
SVGs work in every browser KeyLines supports.
We've tested webicons and IconExperience SVGs in Canvas and WebGL against Chrome, Firefox, Microsoft Edge and Safari. Our results verified that SVGs are fully supported as long as:
- they don’t have foreign object tags
- you’ve set width and height attributes in the SVG file
SVGs in WebGL
To ensure the highest level of performance and stability, SVGs are converted to bitmaps when they're drawn. Like any image, we restrict them to a maximum of 256x256px, so you’ll lose sharpness if you zoom in any further than this. For more recommendations and known issues, see WebGL.
Which image format should I use?
We recommend the following:
- for the most reliable cross-browser support, use PNGs or JPGs.
- for the best scalability, and to dynamically change the colour of the item, use font icons.
- if it's important to have smaller file sizes, or for images of more than one colour to look good at high resolution, use SVGs.