Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
HTML5 Data and Services Cookbook
HTML5 Data and Services Cookbook

HTML5 Data and Services Cookbook: Take the fast track to the rapidly growing world of HTML5 data and services with this brilliantly practical cookbook. Whether building websites or web applications, this is the handbook you need to master HTML5.

eBook
€8.99 €36.99
Paperback
€45.99
Subscription
Free Trial
Renews at €18.99p/m

What do you get with Print?

Product feature icon Instant access to your digital eBook copy whilst your Print order is Shipped
Product feature icon Paperback book shipped to your preferred address
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
OR
Modal Close icon
Payment Processing...
tick Completed

Shipping Address

Billing Address

Shipping Methods
Table of content icon View table of contents Preview book icon Preview Book

HTML5 Data and Services Cookbook

Chapter 2. Display of Graphical Data

In this chapter, we are going to cover many common graphical tasks, such as the following:

  • Creating a line chart

  • Creating a bar chart

  • Creating a pie chart

  • Creating an area chart

  • Displaying combined charts

  • Creating a bubble chart

  • Showing a map with a marked location

  • Showing a map with a path

  • Displaying gauges

  • Displaying a tree

  • LED scoreboard using web fonts

Introduction


In this chapter, we will take a look at displaying graphical data using various JavaScript libraries that are based on modern HTML5 standards. The main idea is to get you interested into various visual parts ranging from 2D graphics with canvas and SVG data-driven documents, with the help of problem-solving examples.

Creating a line chart


Line charts are the most basic type of charts. They display a series of data points connected together by lines. Line charts are often used to visualize time series data.

There are various libraries that implement this charting functionality, both paid and free. We're going to use the Flot chart library. It's free, simple, and easy to use and it has been in active development for the past 4 years. It also aims to produce aesthetically pleasing charts.

In this recipe, we're going to make a time series chart that displays the outside temperature history for the past 24 hours.

Getting ready

We'll need to download Flot from the official website at http://www.flotcharts.org/, and extract the contents to a separate folder named flot.

How to do it...

Let's write the HTML and JavaScript code.

  1. Create a basic HTML page with a placeholder for our chart. We're also going to include jQuery (needed by Flot) and Flot itself. Flot needs to draw the chart canvas a placeholder div, so we're...

Creating a bar chart


In contrast to a line chart, which is usually used to display averages or momentary values, bar charts are used to visualize data that belongs to discrete groups. Examples include daily, monthly, and weekly sales (the groups are days, months, and weeks respectively), page visits per user, fuel consumption for each car, and so on.

The Flot chart library can also draw bar charts. In this example, we're going to visualize the number of daily sales for the past seven days. We're also going to show the sales from separate products separately, stacked on top of each other.

Getting ready

We'll need to download Flot from the official website at http://www.flotcharts.org/ and extract the contents to a separate folder named flot.

How to do it...

Let's modify the line chart code to make it draw our bar charts.

  1. First, we're going to copy the same HTML page from the previous line chart recipe, but we'll make some changes. In order to draw stacking bars, we're going to need the stacking...

Creating a pie chart


When visualizing proportions or percentages as a whole, we usually use pie charts. Pie charts are simple enough to draw on our own; however, to get more flexibility and aesthetically pleasing results, we're going to use the Flot charting library with its pie plugin.

Flot's pie plugin can show a pie with or without a legend, and has extensive options for controlling the position of the labels. It's also capable of rendering tilted pies and donuts. Support for interactive pies is also included.

In this recipe, we're going to make a pie chart of our visitor's browsers.

Getting ready

We'll need to download Flot from the official website at http://www.flotcharts.org/ and extract the contents to a separate folder named flot.

How to do it...

Let's write the HTML and JavaScript code.

  1. Create the following HTML page in index.html:

    <!DOCTYPE HTML>
    <html>
        <head>
            <title>Chart example</title>
        </head>
        <body>
            <div id=...

Creating an area chart


Area charts are usually used in place of line charts when we want to stack multiple results on top of each other. They can also be used to enhance the visual appeal of the chart in certain circumstances.

This recipe will present an example where the area chart is used for an enhanced visual appeal: displaying altitude data.

Let's say we need to visualize the altitude of a 8-km downhill hike succeeded by 12 km of flat walking. We would also like to mark the "mountain" portion of the chart. Finally, we would like the area below the altitude line to be filled in a way reminiscent of color relief maps with the color green for low, yellow for medium, and white for high-altitude.

Getting ready

We'll also use the Flot chart library in this example, so we will need to download Flot from the official website ta http://www.flotcharts.org/ and extract the content to a separate folder named flot.

How to do it...

  1. Our HTML file needs a chart placeholder element and the necessary scripts...

Displaying combined charts


Combined charts are charts that have more than one x or y axis, and may have multiple types of series (lines, bars, and areas). Sometimes, we may want to present multiple heterogeneous types of data on a single chart, usually to visualize its correlation.

In this recipe, we're going to try and visualize a mountain hike by presenting both temperature and altitude on a single chart. The altitude series will be an area chart with gradient colors reminiscent of relief maps, but the temperature series will be a line chart, which we would like to be red if above 19 degrees Celsius and blue if below that.

In order to do this, we're going to need a charting library that can handle two y axes. We're going to use the Flot charting library because it is capable of displaying charts with two or more x or y axes.

Getting ready

Like in the previous recipes, we need to download Flot from the official website at http://www.flotcharts.org/ and extract the contents to a separate folder...

Creating a bubble chart


Bubble charts can display sets of values as circles. They're usable for datasets with sizes in the range 10 through 100. They're particularly useful for visualizing values that differ by orders of magnitude and can replace pie charts in those situations.

As bubble charts are more complex and slightly less common, we're going to need a flexible library to draw them. The excellent D3 library (http://d3js.org/) is a great fit; it provides a set of tools, (the core data-driven DOM API plus the "pack" data layout) that enables the creation of bubble charts.

We're going to draw a bubble chart displaying the numbers of visitors coming to our website from referring websites.

How to do it...

Let's write the HTML and JavaScript code.

  1. We're going to create an HTML page containing our chart placeholder. We're going to include the chart library D3, and the code that will draw the bubble chart from our example.js file:

    <!DOCTYPE HTML>
    <html>
        <head>
            <title...

Showing a map with a marked location


The rise of Google Maps and their excellent API popularized the embedding of maps on websites. Embedded maps have a variety of uses: displaying places that users have been to, displaying locations of events, displaying locations of stores owned by a business, and many others. Maps can be displayed along with every textual address displayed on our websites.

In this recipe we're going to make a simple map with a single location marked on it. To do this, we're going to use the Leaflet library (http://leafletjs.com/), which is a well known and widely library used by Flickr, FourSquare, Craigslist, Wikimedia, and other popular sites.

We're going to display an OpenStreetMap map layer. OpenStreetMap (http://www.openstreetmap.org/) is a free Wikipedia-like collaboratively created street map with great coverage.

We're also going to add a description balloon, which would be displayed when the placemark is clicked.

How to do it...

Let's write the HTML and JavaScript...

Showing a map with a path


When displaying maps, sometimes we may want to show more than just locations. Besides markers, the other most common map overlays are paths and areas.

In this recipe, we're going to create a map showing a path and an area.

How to do it...

Let's write the HTML and JavaScript code.

  1. Like in the Showing a map with a marked location recipe, we'll need to include the appropriate CSS and scripts. The following is an example HTML file:

    <!DOCTYPE HTML>
    <html>
        <head>
            <title>Map example</title>
            <link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.4/leaflet.css" />
            <!--[if lte IE 8]>
            <link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.4/leaflet.ie.css" />
            <![endif]-->
        </head>
        <body>
            <div id="map" style="height:480px; width:640px;"></div>
            <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min...

Displaying gauges


Analog gauges are useful for visualizing data with values bound between predefined minimums and maximums, which undergo changes over time. Examples include amount of fuel, current speed, disk space, process and memory usage, and so on.

In this recipe, we're going to make a very flexible, data-driven gauge plugin for jQuery. Then we're going to use this plugin to display an analog car speedometer. The following is how the speedometer will look:

The recipe makes extensive use of HTML5's canvas.

How to do it...

Let's write the HTML code for our example, the gauge plugin and the code that ties them together.

  1. Make a simple HTML file with a canvas for our gauge:

    <!DOCTYPE HTML>
    <html>
        <head>
            <title>Gauge example</title>
        </head>
        <body>
            <canvas id="gauge" width="400" height="400"></canvas>
            <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
          ...

Displaying a tree


In this recipe, we will take a look into how to display data in a tree-like layout. We are going to visualize a small family tree of Linux represented via JSON file. Additionally, will be using the D3.js file for manipulating the DOM to display the data.

Getting ready

First, we need to have the data that is going to be used for the visualization. We need to get the tree.json file that is part of the examples for this recipe.

How to do it...

We will write the HTML and the backing JavaScript code that should generate data from a JSON file:

  1. Let's first take a look a the structure of the JSON data:

    {
      "name": "GNU/Linux",
      "url": "http://en.wikipedia.org/wiki/Linux",
      "children": [
        {
          "name": "Red Hat",
          "url": "http://www.redhat.com",
          "children": [ .. ]
       } ]
    ...
    }

    Each object has a name attribute representing the distribution name, a url attribute that has a link to the official web page, and the optional children attribute that can contain a list of other...

LED scoreboard using web fonts


In this recipe, we are going create an LED scoreboard similar to the ones used in basketball games by making a clever use of HTML web fonts. The main goal of the recipe is to get introduced to web fonts and the features they offer.

Tip

The full specification on web fonts can be found on W3C at http://www.w3.org/TR/css3-webfonts/.

Getting ready

Before staring, you need to get the font we are going to use in this example. The files can be retrieved from the examples code, and they all have a RADIOLAND prefix.

How to do it...

To create the scoreboard, we will create an HTML page, a backing JavaScript code that will update the timers, and related data, as well as a CSS file that will use web fonts:

  1. First, we will start with creation of the HTML page; in the head section, include stylesheet.css and a dependency to jQuery

      <link rel="stylesheet" href="stylesheet.css" type="text/css" charset="utf-8">
      <script src="http://ajax.googleapis.com/ajax/libs/jquery/1...
Left arrow icon Right arrow icon

Key benefits

  • Learn to effectively display lists and tables, draw charts, animate elements and use modern techniques such as templates and data-binding frameworks through simple and short examples.
  • Examples utilizing modern HTML5 features such as rich text editing, file manipulation, graphics drawing capabilities, real time communication.
  • Explore the full power of HTML5 - from number rounding to advanced graphics to real-time data binding - we have it covered.

Description

HTML5 is everywhere. From PCs to tablets to smartphones and even TVs, the web is the most ubiquitous application platform and information medium bar. Its becoming a first class citizen in established operating systems such as Microsoft Windows 8 as well as the primary platform of new operating systems such as Google Chrome OS. "HTML5 Data and Services Cookbook" contains over 100 recipes explaining how to utilize modern features and techniques when building websites or web applications. This book will help you to explore the full power of HTML5 - from number rounding to advanced graphics to real-time data binding. "HTML5 Data and Services Cookbook" starts with the display of text and related data. Then you will be guided through graphs and animated visualizations followed by input and input controls. Data serialization, validation and communication with the server as well as modern frameworks with advanced features like automatic data binding and server communication will also be covered in detail.This book covers a fast track into new libraries and features that are part of HTML5!

Who is this book for?

This book is for programmers and developers who work with a lot of backend code and want to get fast tracked into the world of HTML5 and Javascript. It is also for JavaScript developers who would like to update their knowledge with new techniques and capabilities made possible with HTML5.Some experience in HTML and jQuery is assumed.

What you will learn

  • Making charts using flot or HTML5 canvas.
  • Creating awesome visualizations with D3.js
  • Common helpers when working with input
  • Making animated and iteractive visualzations
  • Using the HTML5 input helpers
  • Creating custom input components
  • Client-side templating to simplify HTML generation
  • Manipulating and storing data on the client side
Estimated delivery fee Deliver to Malta

Premium delivery 7 - 10 business days

€32.95
(Includes tracking information)

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Sep 03, 2013
Length: 480 pages
Edition : 1st
Language : English
ISBN-13 : 9781783559282
Languages :
Tools :

What do you get with Print?

Product feature icon Instant access to your digital eBook copy whilst your Print order is Shipped
Product feature icon Paperback book shipped to your preferred address
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
OR
Modal Close icon
Payment Processing...
tick Completed

Shipping Address

Billing Address

Shipping Methods
Estimated delivery fee Deliver to Malta

Premium delivery 7 - 10 business days

€32.95
(Includes tracking information)

Product Details

Publication date : Sep 03, 2013
Length: 480 pages
Edition : 1st
Language : English
ISBN-13 : 9781783559282
Languages :
Tools :

Packt Subscriptions

See our plans and pricing
Modal Close icon
€18.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
€189.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just €5 each
Feature tick icon Exclusive print discounts
€264.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just €5 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total 124.97
HTML5 Data and Services Cookbook
€45.99
Object-Oriented JavaScript - Second Edition
€41.99
HTML5 Web Application Development By Example : Beginner's guide
€36.99
Total 124.97 Stars icon
Banner background image

Table of Contents

12 Chapters
Display of Textual Data Chevron down icon Chevron up icon
Display of Graphical Data Chevron down icon Chevron up icon
Animated Data Display Chevron down icon Chevron up icon
Using HTML5 Input Components Chevron down icon Chevron up icon
Custom Input Components Chevron down icon Chevron up icon
Data Validation Chevron down icon Chevron up icon
Data Serialization Chevron down icon Chevron up icon
Communicating with Servers Chevron down icon Chevron up icon
Client-side Templates Chevron down icon Chevron up icon
Data Binding Frameworks Chevron down icon Chevron up icon
Data Storage Chevron down icon Chevron up icon
Multimedia Chevron down icon Chevron up icon

Customer reviews

Top Reviews
Rating distribution
Full star icon Full star icon Full star icon Full star icon Half star icon 4.3
(7 Ratings)
5 star 28.6%
4 star 71.4%
3 star 0%
2 star 0%
1 star 0%
Filter icon Filter
Top Reviews

Filter reviews by




Luigi Oct 24, 2013
Full star icon Full star icon Full star icon Full star icon Full star icon 5
I just finished to read this book and I really liked it! I missed many of latest updates about HTML5 and this book helped me to update my knowledge and to improve my skills. I liked especially chapters 4,5 and 6; chapter 4 is about the new input types available in HTML5 that allow the developers to use advanced input that uses geolocation, time, drag&drop and so on. Chapter 5 is about Custom input components and explains how to create custom controlos such as menus, rich-text input, dialog and so on. Chapter 6 is about Data validation in HTML5 that is often a little problematic for me. In sum, I say that this book is very helpful for people who needs to update their knowledge about this new subset of HTML5.
Amazon Verified review Amazon
Victor Jul 28, 2016
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Great book. Yearly delivery. Everything match the description.
Amazon Verified review Amazon
Joel Lamotte Oct 28, 2013
Full star icon Full star icon Full star icon Full star icon Empty star icon 4
For someone like me who is not doing web development often but still need to use HTML5, Javascript and some other related technologies regularly, this book is really helpful. As the name states, it's a cookbook and assume you have basics using these techs and just present ways of doing things usual like setting up a Markdown based text editor or displaying charts. I found that it's a good starting point for having a quick idea of how something in a web page can be done. It's also introducing to NodeJS which I don't think I'll use in my current projects but why not later.To summarize, it's very useful quick cookbook and helps me understand how things are done usually by people doing web dev. all the time.
Amazon Verified review Amazon
Dustin Marx Dec 19, 2013
Full star icon Full star icon Full star icon Full star icon Empty star icon 4
HTML5 Data and Services Cookbook is packed with information regarding modern HTML5 development. Like most technology "cookbooks," this book is a collection of "recipes" for applying various aspects of HTML5 (HTML/JavaScript/CSS) categorized into 12 chapters.Node.js is used in many of the recipes in HTML5 Data and Services Cookbook and Appendix A explains how to access and install Node.js. Other key concepts of modern HTML5 covered in this book include JSON, Ajax, Comet, Web Sockets, Web Storage, Canvas, History API, File System API, and more. HTML5 Data and Services Cookbook uses a huge number of freely available open source libraries, frameworks, and toolkits in implementing its recipes. I see this as an advantage because not only did this approach help me to see how to implement a specific solution, but it gave me broader knowledge of the large number of resources that are out there for the HTML5 developer. Someone wanting the recipes to be in straight JavaScript without libraries or frameworks might be disappointed by this, but one can always look at the implementations of those open source products to see the direct JavaScript implementation. Although jQuery and Node.js are used heavily in the book, many smaller and lesser known libraries and frameworks are also used. I was happy to see coverage of AngularJS and Meteor together in one of the book's chapters.The authors of HTML5 Data and Services Cookbook sprinkle tips and commonly accepted JavaScript/HTML/CSS best practices throughout their recipes. I also appreciated that many of their recipes provided detailed "fallback" alternatives that can be used to support browsers which don't comply with the new feature outlined in the recipe. The authors include hundreds of links in the book to HTML5 related items and even to things that are not specifically HTML5 but are part of the "business logic" being implemented in the sample in a particular recipe. I found even some of these non-HTML5-related nuggets of information to be enlightening.The two main downsides of HTML5 Data and Services Cookbook for me were presentation related rather than content related. The code listings are only differentiated from the book's prose by font (code is in fixed-width font). It would have been nice to have a border around the code to more clearly visually separate it from the text and line numbers and color coded syntax would have been really nice. The PDF version of the book that I reviewed had the code listings in black fixed-width font with no lines numbers and no visual separation from the prose other than the different font. There are some awkward sentences in the book. I was able to figure out the intent of most of them, but 2 or 3 sentences left me without any certainty about what they authors were communicating. There were far more occurrences of minor grammar issues that did not take away from the meaning, but did slow down the reading flow. Overall though, the majority of the book was highly readable and approachable.Readers who are probably best suited to gain from HTML5 Data and Services Cookbook are those who have a little JavaScript experience, but have not used it a lot or have not used it in recent years. Although the book is well over 450 pages long, it is so packed with details and information that it cannot take a lot of space to provide introductory JavaScript, HTML, and CSS information. The book seems best suited for someone not entirely new to JavaScript development who has only used modern HTML5 tactics in a very small way. Even experienced web developers are likely to learn from reading this book because of the wide breadth of subjects, frameworks, libraries, and toolkits that it covers and uses.
Amazon Verified review Amazon
W Boudville Oct 02, 2013
Full star icon Full star icon Full star icon Full star icon Empty star icon 4
The authors want to educate you in understanding how to fully or better use HTML5 with Javascript, both on the client side and for the server side. Just going through the many sections and code snippets gives an appreciation that this combination now can rank as a fully fledged programming language.One quick way is to consider Chapter 3 for drawing graphs that the user can interact with. The examples are good in also showing how to get external javascript and CSS packages into your code. But mostly the chapter tells how to easily put in the necessary graphical elements, like sliders and axes. Other features include the ability to zoom in and out and to pan across a chart. You must have seen such things before, in fully fledged graphical applications, like Mathematica and OpenGL. To be sure, what the current text describes does not even begin to approach those in the full graphical functionality. But for general purpose use, the HTML5 and javascript can be surprisingly versatile for simple graphs.Another chapter of the book goes into data validation. Where the user inputs data into a text widget and your code checks the input values for correctness. Like if it meant to be an integer. Or the strength of an input password. I imagine the latter should catch the attention of some readers. The discussion takes you into the use of regular expressions [regex], something fleshed out over the last 30 years in unix. Just learning regex if you are new to it can be very useful in other programming contexts; not just data validation.The complexity of the text increases somewhat when it gets into how to talk from the client side to servers. Extensive use of JSON to hold data in an object oriented manner. Ajax also gets considerable use. It lets you push data from the server to the browser, where the user of the browser does not explicitly have to do anything. Greatly expands the idea of interactivity, if you have never heard that browsers can do such behaviour. As an inventor, I commissioned prototypes of my first patent where the pushing to the browser was absolutely essential to the overall interaction. So this section of the book was of especial interest to me.
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

What is the delivery time and cost of print book? Chevron down icon Chevron up icon

Shipping Details

USA:

'

Economy: Delivery to most addresses in the US within 10-15 business days

Premium: Trackable Delivery to most addresses in the US within 3-8 business days

UK:

Economy: Delivery to most addresses in the U.K. within 7-9 business days.
Shipments are not trackable

Premium: Trackable delivery to most addresses in the U.K. within 3-4 business days!
Add one extra business day for deliveries to Northern Ireland and Scottish Highlands and islands

EU:

Premium: Trackable delivery to most EU destinations within 4-9 business days.

Australia:

Economy: Can deliver to P. O. Boxes and private residences.
Trackable service with delivery to addresses in Australia only.
Delivery time ranges from 7-9 business days for VIC and 8-10 business days for Interstate metro
Delivery time is up to 15 business days for remote areas of WA, NT & QLD.

Premium: Delivery to addresses in Australia only
Trackable delivery to most P. O. Boxes and private residences in Australia within 4-5 days based on the distance to a destination following dispatch.

India:

Premium: Delivery to most Indian addresses within 5-6 business days

Rest of the World:

Premium: Countries in the American continent: Trackable delivery to most countries within 4-7 business days

Asia:

Premium: Delivery to most Asian addresses within 5-9 business days

Disclaimer:
All orders received before 5 PM U.K time would start printing from the next business day. So the estimated delivery times start from the next day as well. Orders received after 5 PM U.K time (in our internal systems) on a business day or anytime on the weekend will begin printing the second to next business day. For example, an order placed at 11 AM today will begin printing tomorrow, whereas an order placed at 9 PM tonight will begin printing the day after tomorrow.


Unfortunately, due to several restrictions, we are unable to ship to the following countries:

  1. Afghanistan
  2. American Samoa
  3. Belarus
  4. Brunei Darussalam
  5. Central African Republic
  6. The Democratic Republic of Congo
  7. Eritrea
  8. Guinea-bissau
  9. Iran
  10. Lebanon
  11. Libiya Arab Jamahriya
  12. Somalia
  13. Sudan
  14. Russian Federation
  15. Syrian Arab Republic
  16. Ukraine
  17. Venezuela
What is custom duty/charge? Chevron down icon Chevron up icon

Customs duty are charges levied on goods when they cross international borders. It is a tax that is imposed on imported goods. These duties are charged by special authorities and bodies created by local governments and are meant to protect local industries, economies, and businesses.

Do I have to pay customs charges for the print book order? Chevron down icon Chevron up icon

The orders shipped to the countries that are listed under EU27 will not bear custom charges. They are paid by Packt as part of the order.

List of EU27 countries: www.gov.uk/eu-eea:

A custom duty or localized taxes may be applicable on the shipment and would be charged by the recipient country outside of the EU27 which should be paid by the customer and these duties are not included in the shipping charges been charged on the order.

How do I know my custom duty charges? Chevron down icon Chevron up icon

The amount of duty payable varies greatly depending on the imported goods, the country of origin and several other factors like the total invoice amount or dimensions like weight, and other such criteria applicable in your country.

For example:

  • If you live in Mexico, and the declared value of your ordered items is over $ 50, for you to receive a package, you will have to pay additional import tax of 19% which will be $ 9.50 to the courier service.
  • Whereas if you live in Turkey, and the declared value of your ordered items is over € 22, for you to receive a package, you will have to pay additional import tax of 18% which will be € 3.96 to the courier service.
How can I cancel my order? Chevron down icon Chevron up icon

Cancellation Policy for Published Printed Books:

You can cancel any order within 1 hour of placing the order. Simply contact customercare@packt.com with your order details or payment transaction id. If your order has already started the shipment process, we will do our best to stop it. However, if it is already on the way to you then when you receive it, you can contact us at customercare@packt.com using the returns and refund process.

Please understand that Packt Publishing cannot provide refunds or cancel any order except for the cases described in our Return Policy (i.e. Packt Publishing agrees to replace your printed book because it arrives damaged or material defect in book), Packt Publishing will not accept returns.

What is your returns and refunds policy? Chevron down icon Chevron up icon

Return Policy:

We want you to be happy with your purchase from Packtpub.com. We will not hassle you with returning print books to us. If the print book you receive from us is incorrect, damaged, doesn't work or is unacceptably late, please contact Customer Relations Team on customercare@packt.com with the order number and issue details as explained below:

  1. If you ordered (eBook, Video or Print Book) incorrectly or accidentally, please contact Customer Relations Team on customercare@packt.com within one hour of placing the order and we will replace/refund you the item cost.
  2. Sadly, if your eBook or Video file is faulty or a fault occurs during the eBook or Video being made available to you, i.e. during download then you should contact Customer Relations Team within 14 days of purchase on customercare@packt.com who will be able to resolve this issue for you.
  3. You will have a choice of replacement or refund of the problem items.(damaged, defective or incorrect)
  4. Once Customer Care Team confirms that you will be refunded, you should receive the refund within 10 to 12 working days.
  5. If you are only requesting a refund of one book from a multiple order, then we will refund you the appropriate single item.
  6. Where the items were shipped under a free shipping offer, there will be no shipping costs to refund.

On the off chance your printed book arrives damaged, with book material defect, contact our Customer Relation Team on customercare@packt.com within 14 days of receipt of the book with appropriate evidence of damage and we will work with you to secure a replacement copy, if necessary. Please note that each printed book you order from us is individually made by Packt's professional book-printing partner which is on a print-on-demand basis.

What tax is charged? Chevron down icon Chevron up icon

Currently, no tax is charged on the purchase of any print book (subject to change based on the laws and regulations). A localized VAT fee is charged only to our European and UK customers on eBooks, Video and subscriptions that they buy. GST is charged to Indian customers for eBooks and video purchases.

What payment methods can I use? Chevron down icon Chevron up icon

You can pay with the following card types:

  1. Visa Debit
  2. Visa Credit
  3. MasterCard
  4. PayPal
What is the delivery time and cost of print books? Chevron down icon Chevron up icon

Shipping Details

USA:

'

Economy: Delivery to most addresses in the US within 10-15 business days

Premium: Trackable Delivery to most addresses in the US within 3-8 business days

UK:

Economy: Delivery to most addresses in the U.K. within 7-9 business days.
Shipments are not trackable

Premium: Trackable delivery to most addresses in the U.K. within 3-4 business days!
Add one extra business day for deliveries to Northern Ireland and Scottish Highlands and islands

EU:

Premium: Trackable delivery to most EU destinations within 4-9 business days.

Australia:

Economy: Can deliver to P. O. Boxes and private residences.
Trackable service with delivery to addresses in Australia only.
Delivery time ranges from 7-9 business days for VIC and 8-10 business days for Interstate metro
Delivery time is up to 15 business days for remote areas of WA, NT & QLD.

Premium: Delivery to addresses in Australia only
Trackable delivery to most P. O. Boxes and private residences in Australia within 4-5 days based on the distance to a destination following dispatch.

India:

Premium: Delivery to most Indian addresses within 5-6 business days

Rest of the World:

Premium: Countries in the American continent: Trackable delivery to most countries within 4-7 business days

Asia:

Premium: Delivery to most Asian addresses within 5-9 business days

Disclaimer:
All orders received before 5 PM U.K time would start printing from the next business day. So the estimated delivery times start from the next day as well. Orders received after 5 PM U.K time (in our internal systems) on a business day or anytime on the weekend will begin printing the second to next business day. For example, an order placed at 11 AM today will begin printing tomorrow, whereas an order placed at 9 PM tonight will begin printing the day after tomorrow.


Unfortunately, due to several restrictions, we are unable to ship to the following countries:

  1. Afghanistan
  2. American Samoa
  3. Belarus
  4. Brunei Darussalam
  5. Central African Republic
  6. The Democratic Republic of Congo
  7. Eritrea
  8. Guinea-bissau
  9. Iran
  10. Lebanon
  11. Libiya Arab Jamahriya
  12. Somalia
  13. Sudan
  14. Russian Federation
  15. Syrian Arab Republic
  16. Ukraine
  17. Venezuela