R> M$type
[1] "MotionChart"
R> M$chartid
[1] "MotionChartID212d6d31dc7d"
The html output is a list with header, chart, caption and footer. This allows the
user to extract only certain parts of the page, or to create a complete html page.
The header part of the html page has only basic html and formatting tags:
R> print(M, tag='header')
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>MotionChartID212d6d31dc7d</title>
<meta http-equiv="content-type" content="text/html;charset=utf-8" />
<style type="text/css">
body {
color: #444444;
font-family: Arial,Helvetica,sans-serif;
font-size: 75%;
}
a {
color: #4D87C7;
text-decoration: none;
}
</style>
</head>
<body>
Here we used the print statement with the tag ’header’ instead of M$html$header
to achieve a formatted screen output. This is the same output as cat(M$html$chart).
The actual Google visualisation code is stored with the data as a named character
vector in the chart item of the html list. The chart is made up of several JavaScript
and HTML statements. Please notice that the JavaScript functions are uniquely
named with the information of the chart id. This concept allows the user get all
the chart code directly or only specific parts; see the examples in the help page of
print.gvis for more details.
R> names(M$html$chart)
11
Comentários a estes Manuais