SlideShare ist ein Scribd-Unternehmen logo
1 von 8
Easy charting with JavaScript and HTML5 Major
Agenda The history of presenting a rich visual element (like a chart) in the browser. Canvas SVG How to choose them?
History Make a round-trip to the serverThe server creates or fetches the necessary image data and pipes the results back to the browser. Works everywhere, but the results are usually static. Any changes to the image require more trips to the server.  Use a browser plug-inPlug-ins clearly work-around browser limits and can provide rich visual renderings, but they require a software install and introduce a whole new (non-standard) layer of technology that must be learned and maintained by developers.  Fugly browser hacksYou've seen them. CSS and HTML that's manipulated and abused to give the appearance of something more "image-like." This method is painful, crude, and wrong. But it's been one of the only options for years…
   HTML5 is bringing with it two technologies that give developers the ability to draw in the browser: Canvas and Scalable Vector Graphics (SVG). Both give developers a way to directly manipulate pixels in the browser, which unlocks a whole host of new possibilities for "pure" HTML and JavaScript applications. These two technologies have some key differences, though.
Canvas Canvas is part of the HTML5 spec. It provides developers with what amounts to a writable bitmap area on a page that can be manipulated with JavaScript. In fact, you must use JavaScript to display anything on a canvas. It is not markup based, so API calls are required to draw. The pixel-driven nature of canvas makes it ideal for scenarios where rendering speed is key, such as games. It doesn't matter if you have 1 or 10,000 "objects" being painted to your canvas, if the resolution is the same, it's all about redrawing the same pixel area. The downside of canvas' pixel-driven nature is that it's harder to interact with. If you do have "objects" that you want users to interact with, you have create and track those objects on your own in JavaScript. And a designer can't create a "canvas" in Illustrator. API calls have to be programmed to make canvas work.
SVG Scalable Vector Graphics have actually been around much longer than HTML5. Browsers like Firefox, Opera, and Safari have offered varying degrees of support for SVG since 2005. Why is SVG only now getting a lot of attention? You guessed it. Internet Explorer. One of the only browsers not to support SVG in the last 5 years was IE. And since IE was (and is) the dominant browser during this time, SVG usage was minimal. IE9 has finally added SVG support, though, and along with improved support across all other browsers, SVG is finally ready for primetime. Unlike canvas, SVG is vector-based (not pixel-based) and is created with markup (instead of APIs). SVG elements, when rendered, actually become part of the page DOM, which means they have properties, events, and are much easier to use for illustrations that expect user interaction. And since SVG is markup-based, designs can be easily exported to SVG format from Illustrator, loaded by the browser, and even cached like images. The downside to living in the DOM is memory. Highly complex visualizations (thousands of objects) will strain browsers since every element in the SVG image is an object (with its own memory needs). That makes SVG great for things like data visualization or logos, leaving complex visual rendering to canvas.
Older Browsers? Clearly, adopting canvas and SVG for rich, interactive visualizations in HTML is a no-brainer, but what happens for older browsers, especially IE (which, as we said, lacks any SVG support pre-IE9)? Fortunately, there is a very similar technology to SVG baked-in to IE5 through IE9 called Vector Markup Language (VML). Originally created for Microsoft Office, VML has a lot of overlap with SVG. When used in conjunction with SVG, VML gives us a way to reach most actively used browsers with some type of in-browser rendering.
Why not Canvas? SVG is interactive. This makes it easy for us to add features like the dynamic tooltips (and even more interactivity to come)  SVG/VML is more broadly supported. Unlike canvas, which is an HTML5 feature, SVG/VML help us support a broad range of new and older browsers without resorting to polyfills.  SVG is vector based. And charts are relatively simple data visualizations. Using SVG lets charts scale crisply to any display size (big or small), and avoids wasting memory rendering more pixels on larger screens.

Weitere ähnliche Inhalte

Was ist angesagt?

Easy HTML5 Data Visualization with Kendo UI DataViz
Easy HTML5 Data Visualization with Kendo UI DataVizEasy HTML5 Data Visualization with Kendo UI DataViz
Easy HTML5 Data Visualization with Kendo UI DataVizLohith Goudagere Nagaraj
 
Cinematic Interactives with Animate CC
Cinematic Interactives with Animate CCCinematic Interactives with Animate CC
Cinematic Interactives with Animate CCJoseph Labrecque
 
W3C HTML5 KIG-HTML5 Game Performance Issue
W3C HTML5 KIG-HTML5 Game Performance IssueW3C HTML5 KIG-HTML5 Game Performance Issue
W3C HTML5 KIG-HTML5 Game Performance IssueChanghwan Yi
 
Modern web technologies
Modern web technologiesModern web technologies
Modern web technologiesOday Alqarra
 
SVG in WebKit: Compositing Status
SVG in WebKit: Compositing StatusSVG in WebKit: Compositing Status
SVG in WebKit: Compositing StatusIgalia
 

Was ist angesagt? (8)

Easy HTML5 Data Visualization with Kendo UI DataViz
Easy HTML5 Data Visualization with Kendo UI DataVizEasy HTML5 Data Visualization with Kendo UI DataViz
Easy HTML5 Data Visualization with Kendo UI DataViz
 
Html5 (games)
Html5 (games)Html5 (games)
Html5 (games)
 
Html5 2da parte
Html5 2da parteHtml5 2da parte
Html5 2da parte
 
Angular JS - Wikilogia
Angular JS - WikilogiaAngular JS - Wikilogia
Angular JS - Wikilogia
 
Cinematic Interactives with Animate CC
Cinematic Interactives with Animate CCCinematic Interactives with Animate CC
Cinematic Interactives with Animate CC
 
W3C HTML5 KIG-HTML5 Game Performance Issue
W3C HTML5 KIG-HTML5 Game Performance IssueW3C HTML5 KIG-HTML5 Game Performance Issue
W3C HTML5 KIG-HTML5 Game Performance Issue
 
Modern web technologies
Modern web technologiesModern web technologies
Modern web technologies
 
SVG in WebKit: Compositing Status
SVG in WebKit: Compositing StatusSVG in WebKit: Compositing Status
SVG in WebKit: Compositing Status
 

Andere mochten auch

Web performance
Web  performance Web  performance
Web performance Major Ye
 
Oculus Collection 2010
Oculus Collection 2010Oculus Collection 2010
Oculus Collection 2010kjincan
 
Jquery introduce
Jquery introduceJquery introduce
Jquery introduceMajor Ye
 
Crowsnest Fire
Crowsnest FireCrowsnest Fire
Crowsnest Firemeryl77
 
Suzonnecrockett Texas S Ta R Chart
Suzonnecrockett Texas S Ta R ChartSuzonnecrockett Texas S Ta R Chart
Suzonnecrockett Texas S Ta R Chartsuzonnecrockett
 
Suzonnecrockett Texas S Ta R Chart
Suzonnecrockett Texas S Ta R ChartSuzonnecrockett Texas S Ta R Chart
Suzonnecrockett Texas S Ta R Chartsuzonnecrockett
 
Study: The Future of VR, AR and Self-Driving Cars
Study: The Future of VR, AR and Self-Driving CarsStudy: The Future of VR, AR and Self-Driving Cars
Study: The Future of VR, AR and Self-Driving CarsLinkedIn
 

Andere mochten auch (9)

Web performance
Web  performance Web  performance
Web performance
 
Oculus Collection 2010
Oculus Collection 2010Oculus Collection 2010
Oculus Collection 2010
 
Jquery introduce
Jquery introduceJquery introduce
Jquery introduce
 
Crowsnest Fire
Crowsnest FireCrowsnest Fire
Crowsnest Fire
 
Beaux Jardins
Beaux JardinsBeaux Jardins
Beaux Jardins
 
Suzonnecrockett Texas S Ta R Chart
Suzonnecrockett Texas S Ta R ChartSuzonnecrockett Texas S Ta R Chart
Suzonnecrockett Texas S Ta R Chart
 
transition
transitiontransition
transition
 
Suzonnecrockett Texas S Ta R Chart
Suzonnecrockett Texas S Ta R ChartSuzonnecrockett Texas S Ta R Chart
Suzonnecrockett Texas S Ta R Chart
 
Study: The Future of VR, AR and Self-Driving Cars
Study: The Future of VR, AR and Self-Driving CarsStudy: The Future of VR, AR and Self-Driving Cars
Study: The Future of VR, AR and Self-Driving Cars
 

Ähnlich wie Easy charting with

Rich Media Advertising with SVG and JavaScript
Rich Media Advertising with SVG and JavaScriptRich Media Advertising with SVG and JavaScript
Rich Media Advertising with SVG and JavaScriptGjokica Zafirovski
 
Academy PRO: HTML5 API graphics
Academy PRO: HTML5 API graphicsAcademy PRO: HTML5 API graphics
Academy PRO: HTML5 API graphicsBinary Studio
 
Canvas Based Presentation tool - First Review
Canvas Based Presentation tool - First ReviewCanvas Based Presentation tool - First Review
Canvas Based Presentation tool - First ReviewArvind Krishnaa
 
Vector Graphics on the Web: SVG, Canvas, CSS3
Vector Graphics on the Web: SVG, Canvas, CSS3Vector Graphics on the Web: SVG, Canvas, CSS3
Vector Graphics on the Web: SVG, Canvas, CSS3Pascal Rettig
 
An introduction to html5 by Devs
An introduction to html5 by DevsAn introduction to html5 by Devs
An introduction to html5 by DevsDebidatta Satapathy
 
From Flash to Canvas - a penchant for black holes
From Flash to Canvas - a penchant for black holesFrom Flash to Canvas - a penchant for black holes
From Flash to Canvas - a penchant for black holesPatric Lanhed
 
Make your own Print & Play card game using SVG and JavaScript
Make your own Print & Play card game using SVG and JavaScriptMake your own Print & Play card game using SVG and JavaScript
Make your own Print & Play card game using SVG and JavaScriptKevin Hakanson
 
W3C HTML5 KIG-The complete guide to building html5 games
W3C HTML5 KIG-The complete guide to building html5 gamesW3C HTML5 KIG-The complete guide to building html5 games
W3C HTML5 KIG-The complete guide to building html5 gamesChanghwan Yi
 
Developing the Next Generation Embedded HMIs
Developing the Next Generation Embedded HMIs Developing the Next Generation Embedded HMIs
Developing the Next Generation Embedded HMIs mentoresd
 
Bootstrap 5 whats new
Bootstrap 5   whats newBootstrap 5   whats new
Bootstrap 5 whats newSandun Perera
 
Crafting the Digital Tapestry: Unveiling the Artistry of Web Development
Crafting the Digital Tapestry: Unveiling the Artistry of Web DevelopmentCrafting the Digital Tapestry: Unveiling the Artistry of Web Development
Crafting the Digital Tapestry: Unveiling the Artistry of Web DevelopmentAppDevelopmentCompan1
 

Ähnlich wie Easy charting with (20)

Rich Media Advertising with SVG and JavaScript
Rich Media Advertising with SVG and JavaScriptRich Media Advertising with SVG and JavaScript
Rich Media Advertising with SVG and JavaScript
 
Practical html5
Practical html5Practical html5
Practical html5
 
Academy PRO: HTML5 API graphics
Academy PRO: HTML5 API graphicsAcademy PRO: HTML5 API graphics
Academy PRO: HTML5 API graphics
 
Canvas Based Presentation tool - First Review
Canvas Based Presentation tool - First ReviewCanvas Based Presentation tool - First Review
Canvas Based Presentation tool - First Review
 
Vector Graphics on the Web: SVG, Canvas, CSS3
Vector Graphics on the Web: SVG, Canvas, CSS3Vector Graphics on the Web: SVG, Canvas, CSS3
Vector Graphics on the Web: SVG, Canvas, CSS3
 
WDE08 State of the web
WDE08 State of the webWDE08 State of the web
WDE08 State of the web
 
An introduction to html5 by Devs
An introduction to html5 by DevsAn introduction to html5 by Devs
An introduction to html5 by Devs
 
From Flash to Canvas - a penchant for black holes
From Flash to Canvas - a penchant for black holesFrom Flash to Canvas - a penchant for black holes
From Flash to Canvas - a penchant for black holes
 
Make your own Print & Play card game using SVG and JavaScript
Make your own Print & Play card game using SVG and JavaScriptMake your own Print & Play card game using SVG and JavaScript
Make your own Print & Play card game using SVG and JavaScript
 
Plunge into HTML5 Canvas – Let’s begin
Plunge into HTML5 Canvas – Let’s beginPlunge into HTML5 Canvas – Let’s begin
Plunge into HTML5 Canvas – Let’s begin
 
W3C HTML5 KIG-The complete guide to building html5 games
W3C HTML5 KIG-The complete guide to building html5 gamesW3C HTML5 KIG-The complete guide to building html5 games
W3C HTML5 KIG-The complete guide to building html5 games
 
Html 5 svg
Html 5 svgHtml 5 svg
Html 5 svg
 
Learn svg
Learn svgLearn svg
Learn svg
 
Developing the Next Generation Embedded HMIs
Developing the Next Generation Embedded HMIs Developing the Next Generation Embedded HMIs
Developing the Next Generation Embedded HMIs
 
Flash Web Development.pdf
Flash Web Development.pdfFlash Web Development.pdf
Flash Web Development.pdf
 
Bootstrap 5 whats new
Bootstrap 5   whats newBootstrap 5   whats new
Bootstrap 5 whats new
 
Before Going Vector
Before Going VectorBefore Going Vector
Before Going Vector
 
Crafting the Digital Tapestry: Unveiling the Artistry of Web Development
Crafting the Digital Tapestry: Unveiling the Artistry of Web DevelopmentCrafting the Digital Tapestry: Unveiling the Artistry of Web Development
Crafting the Digital Tapestry: Unveiling the Artistry of Web Development
 
Intel AppUp Day Bologna
Intel AppUp Day BolognaIntel AppUp Day Bologna
Intel AppUp Day Bologna
 
Handy JS Libraries
Handy JS LibrariesHandy JS Libraries
Handy JS Libraries
 

Kürzlich hochgeladen

The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
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
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
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
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
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
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 

Kürzlich hochgeladen (20)

The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
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...
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
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
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
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
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 

Easy charting with

  • 1. Easy charting with JavaScript and HTML5 Major
  • 2. Agenda The history of presenting a rich visual element (like a chart) in the browser. Canvas SVG How to choose them?
  • 3. History Make a round-trip to the serverThe server creates or fetches the necessary image data and pipes the results back to the browser. Works everywhere, but the results are usually static. Any changes to the image require more trips to the server. Use a browser plug-inPlug-ins clearly work-around browser limits and can provide rich visual renderings, but they require a software install and introduce a whole new (non-standard) layer of technology that must be learned and maintained by developers. Fugly browser hacksYou've seen them. CSS and HTML that's manipulated and abused to give the appearance of something more "image-like." This method is painful, crude, and wrong. But it's been one of the only options for years…
  • 4. HTML5 is bringing with it two technologies that give developers the ability to draw in the browser: Canvas and Scalable Vector Graphics (SVG). Both give developers a way to directly manipulate pixels in the browser, which unlocks a whole host of new possibilities for "pure" HTML and JavaScript applications. These two technologies have some key differences, though.
  • 5. Canvas Canvas is part of the HTML5 spec. It provides developers with what amounts to a writable bitmap area on a page that can be manipulated with JavaScript. In fact, you must use JavaScript to display anything on a canvas. It is not markup based, so API calls are required to draw. The pixel-driven nature of canvas makes it ideal for scenarios where rendering speed is key, such as games. It doesn't matter if you have 1 or 10,000 "objects" being painted to your canvas, if the resolution is the same, it's all about redrawing the same pixel area. The downside of canvas' pixel-driven nature is that it's harder to interact with. If you do have "objects" that you want users to interact with, you have create and track those objects on your own in JavaScript. And a designer can't create a "canvas" in Illustrator. API calls have to be programmed to make canvas work.
  • 6. SVG Scalable Vector Graphics have actually been around much longer than HTML5. Browsers like Firefox, Opera, and Safari have offered varying degrees of support for SVG since 2005. Why is SVG only now getting a lot of attention? You guessed it. Internet Explorer. One of the only browsers not to support SVG in the last 5 years was IE. And since IE was (and is) the dominant browser during this time, SVG usage was minimal. IE9 has finally added SVG support, though, and along with improved support across all other browsers, SVG is finally ready for primetime. Unlike canvas, SVG is vector-based (not pixel-based) and is created with markup (instead of APIs). SVG elements, when rendered, actually become part of the page DOM, which means they have properties, events, and are much easier to use for illustrations that expect user interaction. And since SVG is markup-based, designs can be easily exported to SVG format from Illustrator, loaded by the browser, and even cached like images. The downside to living in the DOM is memory. Highly complex visualizations (thousands of objects) will strain browsers since every element in the SVG image is an object (with its own memory needs). That makes SVG great for things like data visualization or logos, leaving complex visual rendering to canvas.
  • 7. Older Browsers? Clearly, adopting canvas and SVG for rich, interactive visualizations in HTML is a no-brainer, but what happens for older browsers, especially IE (which, as we said, lacks any SVG support pre-IE9)? Fortunately, there is a very similar technology to SVG baked-in to IE5 through IE9 called Vector Markup Language (VML). Originally created for Microsoft Office, VML has a lot of overlap with SVG. When used in conjunction with SVG, VML gives us a way to reach most actively used browsers with some type of in-browser rendering.
  • 8. Why not Canvas? SVG is interactive. This makes it easy for us to add features like the dynamic tooltips (and even more interactivity to come) SVG/VML is more broadly supported. Unlike canvas, which is an HTML5 feature, SVG/VML help us support a broad range of new and older browsers without resorting to polyfills. SVG is vector based. And charts are relatively simple data visualizations. Using SVG lets charts scale crisply to any display size (big or small), and avoids wasting memory rendering more pixels on larger screens.