[ 3 posts ]

Reinoud Bokhorst

  • Username: rnbokhorst
  • Joined: Thu Oct 27, 2011 12:03 am
  • Posts: 3
  • Offline
  • Profile

Charts and Canvas

Post Posted: Mon May 14, 2012 3:49 am
+0-
Hi,

The current documentation about Charts mentions:
Quote:
Based on device and browser capabilities, Charts leverages SVG, HTML Canvas and VML to render its graphical elements.

This caused me to believe that I would get a HTML Canvas based graph in browsers like Chrome 17 or FF 10.0.2 (details below) but instead the examples were all rendered using SVG. What capabilities are required to get a canvas-rendered graph?

Browser details:
Code:
Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:10.0.2) Gecko/20100101 Firefox/10.0.2
Mozilla/5.0 (X11; Linux i686) AppleWebKit/535.11 (KHTML, like Gecko) Chrome/17.0.963.56 Safari/535.11

John Lindal

YUI Contributor

  • Username: jafl
  • Joined: Mon Nov 02, 2009 2:33 pm
  • Posts: 352
  • Location: Los Angeles, CA
  • Twitter: jafl5272
  • GitHub: jafl
  • Gists: jafl
  • Offline
  • Profile

Re: Charts and Canvas

Post Posted: Mon May 14, 2012 8:22 am
+0-
SVG is considered to be superior to Canvas, because Canvas is an opaque blob.

Tripp Bridges

YUI Developer

  • Username: tripp
  • Joined: Wed Jan 07, 2009 1:54 pm
  • Posts: 435
  • GitHub: tripp
  • Gists: tripp
  • YUI Developer
  • Offline
  • Profile
Tags:

Re: Charts and Canvas

Post Posted: Mon May 14, 2012 9:36 am
+0-
Charts was built using svg with canvas and vml for fallbacks when svg was not available. With 3.5 and higher, you can specify canvas as your default engine when declaring your YUI instance.

Code:
YUI({
    defaultGraphicEngine: "canvas"
}).use('charts', function (Y)
{
    //code
});


Thanks,
Tripp
  [ 3 posts ]
Display posts from previous:  Sort by  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum