SlideShare uma empresa Scribd logo
1 de 20
Baixar para ler offline
HTML5 Canvas
DATA VISUALISATION
Antonio Fabregat Mundo
Hinxton Services Forum
May 30, 2013
Data Visualisation using HTML5 Canvas
Hinxton Services Forum
May 30, 2013
Overview
•  Aim
•  Web technologies for rich graphics creation
•  Dealing with the data
•  CANVASing the data
•  Interactivity in Canvas
•  Animation in Canvas
•  Some tips
•  Examples
Data Visualisation using HTML5 Canvas
Hinxton Services Forum
May 30, 2013
Aim
•  Data visualisation
•  Interactivity
•  Animation
Data Visualisation using HTML5 Canvas
Hinxton Services Forum
May 30, 2013
Web technologies for rich graphics creation
CANVAS SVG
High performance 2D surface for drawing. Resolution independence.
Constant performance because everything is a pixel.
Performance only degrades when the image resolution increases.
SVG has very good support for animations.
Elements can be animated using a declarative syntax, or via JavaScript.
Resulting image into the Canvas can be saved as PNG or JPEG. Full control over each element using the SVG DOM API in JavaScript.
Best suited for generating raster graphics, editing of images, and operations
requiring pixel-level manipulation.
Accessibility to the SVG objects can be much better than that of canvas elements.
CANVAS SVG
No DOM nodes for the represented objects. Slow rendering when document complexity increases. A use case is a large dataset to
be represented as an image.
Animation to be implemented manually. SVG might not be suited by itself for applications like games. Perhaps the best choice
would be a Canvas + SVG combination
Poor text rendering capabilities. Difficulties exporting the resulting image.
Advantages
Disadvantages
Data Visualisation using HTML5 Canvas
Hinxton Services Forum
May 30, 2013
Web technologies for rich graphics creation
•  Canvas
•  Interactive image editing
•  Generating raster graphics
•  Image analysis
•  Rendering game graphics, such
as sprites and backgrounds
•  SVG
•  Resolution-independent Web
application user interfaces
•  Highly interactive animated user
interfaces
•  Data charts and plots
•  Vector image editing
Each technology has its own uses
It is not like one can abandon Canvas in favor of SVG, or vice-versa.
Which one to pick?
Data Visualisation using HTML5 Canvas
Hinxton Services Forum
May 30, 2013
Dealing with the data
Data acquisition
Web services providing raw data (XML or JSON format)
Data Visualisation using HTML5 Canvas
Hinxton Services Forum
May 30, 2013
Dealing with the data
Splitting the view from the model
MV* keeps data and representation separated
Data Visualisation using HTML5 Canvas
Hinxton Services Forum
May 30, 2013
CANVASing the data
Client side image generation
Objects in the data model are drawn into the canvas
Data Visualisation using HTML5 Canvas
Hinxton Services Forum
May 30, 2013
CANVASing the data
Graphical projection
Calculating where to draw every object
Depends on the available area and number of objects
Data Visualisation using HTML5 Canvas
Hinxton Services Forum
May 30, 2013
CANVASing the data
Mouse position
Bijective function to determine hovered objects
Data Visualisation using HTML5 Canvas
Hinxton Services Forum
May 30, 2013
Interactivity in Canvas
•  Interactivity is not animation
•  Refreshing canvas when mouse over
•  How to improve behavior?
•  Render screen differences only
•  Back Buffer (redraw a gradient à 5 times faster)
•  Layered canvases
•  Important:
Refreshing more than 24 times per second?
Data Visualisation using HTML5 Canvas
Hinxton Services Forum
May 30, 2013
Animation in Canvas
Full redrawing
Every object drawer defines how to proceed for a certain percentage
Data Visualisation using HTML5 Canvas
Hinxton Services Forum
May 30, 2013
Some tips
Always update the model
Actions over the canvas directly modify the model
Data Visualisation using HTML5 Canvas
Hinxton Services Forum
May 30, 2013
Some tips
Precalculate as much as possible
Calculations that can be done once have to be moved out from the drawing methods
Data Visualisation using HTML5 Canvas
Hinxton Services Forum
May 30, 2013
Some tips
Discrete time slots
Response improvement
Data Visualisation using HTML5 Canvas
Hinxton Services Forum
May 30, 2013
Some tips
Refreshing only when needed
Checking basic user actions before refreshing saves time
Data Visualisation using HTML5 Canvas
Hinxton Services Forum
May 30, 2013
Examples
PRIDE - Protein coverage viewer
PRIDE - Sequence viewer
Data Visualisation using HTML5 Canvas
Hinxton Services Forum
May 30, 2013
METABOLIGHTS – Spectrum viewer
Examples
PRIDE – Spectrum viewer
Data Visualisation using HTML5 Canvas
Hinxton Services Forum
May 30, 2013
Examples
REACTOME – Pathway Diagram
Thank you! J
fabregat@ebi.ac.uk

Mais conteúdo relacionado

Semelhante a HTML5 Canvas Data Visualization

"Responsive Web Design: Clever Tips and Techniques". Vitaly Friedman, Smashin...
"Responsive Web Design: Clever Tips and Techniques". Vitaly Friedman, Smashin..."Responsive Web Design: Clever Tips and Techniques". Vitaly Friedman, Smashin...
"Responsive Web Design: Clever Tips and Techniques". Vitaly Friedman, Smashin...Yandex
 
A brief introduction on HTML5 and responsive layouts
A brief introduction on HTML5 and responsive layoutsA brief introduction on HTML5 and responsive layouts
A brief introduction on HTML5 and responsive layoutsTim Wray
 
Easy charting with
Easy charting withEasy charting with
Easy charting withMajor Ye
 
Web Design Tools
Web Design ToolsWeb Design Tools
Web Design Toolslillianabe
 
Html5 Canvas and Mobile Graphics
Html5 Canvas and Mobile GraphicsHtml5 Canvas and Mobile Graphics
Html5 Canvas and Mobile GraphicsEngin Hatay
 
Html 5 mobile - nitty gritty
Html 5 mobile - nitty grittyHtml 5 mobile - nitty gritty
Html 5 mobile - nitty grittyMario Noble
 
Intro to Responsive Web Design
Intro to Responsive Web DesignIntro to Responsive Web Design
Intro to Responsive Web Designmeghantaylor
 
Streaming of SVG animations on the Web
Streaming of SVG animations on the WebStreaming of SVG animations on the Web
Streaming of SVG animations on the WebCyril Concolato
 
SVG Strikes Back
SVG Strikes BackSVG Strikes Back
SVG Strikes BackMatt Baxter
 
Alexa IT Solution Responsive Web designing
Alexa IT Solution Responsive Web designingAlexa IT Solution Responsive Web designing
Alexa IT Solution Responsive Web designingRavi Panchal
 
Web based interactive big data visualization
Web based interactive big data visualizationWeb based interactive big data visualization
Web based interactive big data visualizationWenli Zhang
 
Responsive web design
Responsive web designResponsive web design
Responsive web designBen MacNeill
 
Responsive Web Design for Drupal, CMS Expo
Responsive Web Design for Drupal, CMS ExpoResponsive Web Design for Drupal, CMS Expo
Responsive Web Design for Drupal, CMS ExpoEmma Jane Hogbin Westby
 
Web-based Information Visualisation
Web-based Information VisualisationWeb-based Information Visualisation
Web-based Information VisualisationJohanna Schmidt
 
MW2011 Grid-based Web Design presentation
MW2011 Grid-based Web Design presentationMW2011 Grid-based Web Design presentation
MW2011 Grid-based Web Design presentationCharlie Moad
 
Responsive Web Design: Clever Tips and Techniques
Responsive Web Design: Clever Tips and TechniquesResponsive Web Design: Clever Tips and Techniques
Responsive Web Design: Clever Tips and TechniquesVitaly Friedman
 
Images blast off at the speed of Jamstack! - Alba Silvente Fuentes
Images blast off at the speed of Jamstack! - Alba Silvente FuentesImages blast off at the speed of Jamstack! - Alba Silvente Fuentes
Images blast off at the speed of Jamstack! - Alba Silvente FuentesWey Wey Web
 
[2015/2016] HTML5 and CSS3 Refresher
[2015/2016] HTML5 and CSS3 Refresher[2015/2016] HTML5 and CSS3 Refresher
[2015/2016] HTML5 and CSS3 RefresherIvano Malavolta
 

Semelhante a HTML5 Canvas Data Visualization (20)

"Responsive Web Design: Clever Tips and Techniques". Vitaly Friedman, Smashin...
"Responsive Web Design: Clever Tips and Techniques". Vitaly Friedman, Smashin..."Responsive Web Design: Clever Tips and Techniques". Vitaly Friedman, Smashin...
"Responsive Web Design: Clever Tips and Techniques". Vitaly Friedman, Smashin...
 
A brief introduction on HTML5 and responsive layouts
A brief introduction on HTML5 and responsive layoutsA brief introduction on HTML5 and responsive layouts
A brief introduction on HTML5 and responsive layouts
 
Easy charting with
Easy charting withEasy charting with
Easy charting with
 
Web Design Tools
Web Design ToolsWeb Design Tools
Web Design Tools
 
Html5 Canvas and Mobile Graphics
Html5 Canvas and Mobile GraphicsHtml5 Canvas and Mobile Graphics
Html5 Canvas and Mobile Graphics
 
Html 5 mobile - nitty gritty
Html 5 mobile - nitty grittyHtml 5 mobile - nitty gritty
Html 5 mobile - nitty gritty
 
Intro to Responsive Web Design
Intro to Responsive Web DesignIntro to Responsive Web Design
Intro to Responsive Web Design
 
Streaming of SVG animations on the Web
Streaming of SVG animations on the WebStreaming of SVG animations on the Web
Streaming of SVG animations on the Web
 
SVG Strikes Back
SVG Strikes BackSVG Strikes Back
SVG Strikes Back
 
Alexa IT Solution Responsive Web designing
Alexa IT Solution Responsive Web designingAlexa IT Solution Responsive Web designing
Alexa IT Solution Responsive Web designing
 
Web based interactive big data visualization
Web based interactive big data visualizationWeb based interactive big data visualization
Web based interactive big data visualization
 
Svcc 2013-css3-and-mobile
Svcc 2013-css3-and-mobileSvcc 2013-css3-and-mobile
Svcc 2013-css3-and-mobile
 
Practical html5
Practical html5Practical html5
Practical html5
 
Responsive web design
Responsive web designResponsive web design
Responsive web design
 
Responsive Web Design for Drupal, CMS Expo
Responsive Web Design for Drupal, CMS ExpoResponsive Web Design for Drupal, CMS Expo
Responsive Web Design for Drupal, CMS Expo
 
Web-based Information Visualisation
Web-based Information VisualisationWeb-based Information Visualisation
Web-based Information Visualisation
 
MW2011 Grid-based Web Design presentation
MW2011 Grid-based Web Design presentationMW2011 Grid-based Web Design presentation
MW2011 Grid-based Web Design presentation
 
Responsive Web Design: Clever Tips and Techniques
Responsive Web Design: Clever Tips and TechniquesResponsive Web Design: Clever Tips and Techniques
Responsive Web Design: Clever Tips and Techniques
 
Images blast off at the speed of Jamstack! - Alba Silvente Fuentes
Images blast off at the speed of Jamstack! - Alba Silvente FuentesImages blast off at the speed of Jamstack! - Alba Silvente Fuentes
Images blast off at the speed of Jamstack! - Alba Silvente Fuentes
 
[2015/2016] HTML5 and CSS3 Refresher
[2015/2016] HTML5 and CSS3 Refresher[2015/2016] HTML5 and CSS3 Refresher
[2015/2016] HTML5 and CSS3 Refresher
 

Último

08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsRoshan Dwivedi
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 

Último (20)

08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 

HTML5 Canvas Data Visualization

  • 1. HTML5 Canvas DATA VISUALISATION Antonio Fabregat Mundo Hinxton Services Forum May 30, 2013
  • 2. Data Visualisation using HTML5 Canvas Hinxton Services Forum May 30, 2013 Overview •  Aim •  Web technologies for rich graphics creation •  Dealing with the data •  CANVASing the data •  Interactivity in Canvas •  Animation in Canvas •  Some tips •  Examples
  • 3. Data Visualisation using HTML5 Canvas Hinxton Services Forum May 30, 2013 Aim •  Data visualisation •  Interactivity •  Animation
  • 4. Data Visualisation using HTML5 Canvas Hinxton Services Forum May 30, 2013 Web technologies for rich graphics creation CANVAS SVG High performance 2D surface for drawing. Resolution independence. Constant performance because everything is a pixel. Performance only degrades when the image resolution increases. SVG has very good support for animations. Elements can be animated using a declarative syntax, or via JavaScript. Resulting image into the Canvas can be saved as PNG or JPEG. Full control over each element using the SVG DOM API in JavaScript. Best suited for generating raster graphics, editing of images, and operations requiring pixel-level manipulation. Accessibility to the SVG objects can be much better than that of canvas elements. CANVAS SVG No DOM nodes for the represented objects. Slow rendering when document complexity increases. A use case is a large dataset to be represented as an image. Animation to be implemented manually. SVG might not be suited by itself for applications like games. Perhaps the best choice would be a Canvas + SVG combination Poor text rendering capabilities. Difficulties exporting the resulting image. Advantages Disadvantages
  • 5. Data Visualisation using HTML5 Canvas Hinxton Services Forum May 30, 2013 Web technologies for rich graphics creation •  Canvas •  Interactive image editing •  Generating raster graphics •  Image analysis •  Rendering game graphics, such as sprites and backgrounds •  SVG •  Resolution-independent Web application user interfaces •  Highly interactive animated user interfaces •  Data charts and plots •  Vector image editing Each technology has its own uses It is not like one can abandon Canvas in favor of SVG, or vice-versa. Which one to pick?
  • 6. Data Visualisation using HTML5 Canvas Hinxton Services Forum May 30, 2013 Dealing with the data Data acquisition Web services providing raw data (XML or JSON format)
  • 7. Data Visualisation using HTML5 Canvas Hinxton Services Forum May 30, 2013 Dealing with the data Splitting the view from the model MV* keeps data and representation separated
  • 8. Data Visualisation using HTML5 Canvas Hinxton Services Forum May 30, 2013 CANVASing the data Client side image generation Objects in the data model are drawn into the canvas
  • 9. Data Visualisation using HTML5 Canvas Hinxton Services Forum May 30, 2013 CANVASing the data Graphical projection Calculating where to draw every object Depends on the available area and number of objects
  • 10. Data Visualisation using HTML5 Canvas Hinxton Services Forum May 30, 2013 CANVASing the data Mouse position Bijective function to determine hovered objects
  • 11. Data Visualisation using HTML5 Canvas Hinxton Services Forum May 30, 2013 Interactivity in Canvas •  Interactivity is not animation •  Refreshing canvas when mouse over •  How to improve behavior? •  Render screen differences only •  Back Buffer (redraw a gradient à 5 times faster) •  Layered canvases •  Important: Refreshing more than 24 times per second?
  • 12. Data Visualisation using HTML5 Canvas Hinxton Services Forum May 30, 2013 Animation in Canvas Full redrawing Every object drawer defines how to proceed for a certain percentage
  • 13. Data Visualisation using HTML5 Canvas Hinxton Services Forum May 30, 2013 Some tips Always update the model Actions over the canvas directly modify the model
  • 14. Data Visualisation using HTML5 Canvas Hinxton Services Forum May 30, 2013 Some tips Precalculate as much as possible Calculations that can be done once have to be moved out from the drawing methods
  • 15. Data Visualisation using HTML5 Canvas Hinxton Services Forum May 30, 2013 Some tips Discrete time slots Response improvement
  • 16. Data Visualisation using HTML5 Canvas Hinxton Services Forum May 30, 2013 Some tips Refreshing only when needed Checking basic user actions before refreshing saves time
  • 17. Data Visualisation using HTML5 Canvas Hinxton Services Forum May 30, 2013 Examples PRIDE - Protein coverage viewer PRIDE - Sequence viewer
  • 18. Data Visualisation using HTML5 Canvas Hinxton Services Forum May 30, 2013 METABOLIGHTS – Spectrum viewer Examples PRIDE – Spectrum viewer
  • 19. Data Visualisation using HTML5 Canvas Hinxton Services Forum May 30, 2013 Examples REACTOME – Pathway Diagram