line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Spreadsheet::WriteExcel::Chart::Scatter; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
############################################################################### |
4
|
|
|
|
|
|
|
# |
5
|
|
|
|
|
|
|
# Scatter - A writer class for Excel Scatter charts. |
6
|
|
|
|
|
|
|
# |
7
|
|
|
|
|
|
|
# Used in conjunction with Spreadsheet::WriteExcel::Chart. |
8
|
|
|
|
|
|
|
# |
9
|
|
|
|
|
|
|
# See formatting note in Spreadsheet::WriteExcel::Chart. |
10
|
|
|
|
|
|
|
# |
11
|
|
|
|
|
|
|
# Copyright 2000-2010, John McNamara, jmcnamara@cpan.org |
12
|
|
|
|
|
|
|
# |
13
|
|
|
|
|
|
|
# Documentation after __END__ |
14
|
|
|
|
|
|
|
# |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
require Exporter; |
17
|
|
|
|
|
|
|
|
18
|
1
|
|
|
1
|
|
7
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
39
|
|
19
|
1
|
|
|
1
|
|
5
|
use Spreadsheet::WriteExcel::Chart; |
|
1
|
|
|
|
|
90
|
|
|
1
|
|
|
|
|
50
|
|
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
|
22
|
1
|
|
|
1
|
|
6
|
use vars qw($VERSION @ISA); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
594
|
|
23
|
|
|
|
|
|
|
@ISA = qw(Spreadsheet::WriteExcel::Chart Exporter); |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
$VERSION = '2.40'; |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
############################################################################### |
28
|
|
|
|
|
|
|
# |
29
|
|
|
|
|
|
|
# new() |
30
|
|
|
|
|
|
|
# |
31
|
|
|
|
|
|
|
# |
32
|
|
|
|
|
|
|
sub new { |
33
|
|
|
|
|
|
|
|
34
|
1
|
|
|
1
|
0
|
2
|
my $class = shift; |
35
|
1
|
|
|
|
|
6
|
my $self = Spreadsheet::WriteExcel::Chart->new( @_ ); |
36
|
|
|
|
|
|
|
|
37
|
1
|
|
|
|
|
4
|
bless $self, $class; |
38
|
1
|
|
|
|
|
4
|
return $self; |
39
|
|
|
|
|
|
|
} |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
############################################################################### |
43
|
|
|
|
|
|
|
# |
44
|
|
|
|
|
|
|
# _store_chart_type() |
45
|
|
|
|
|
|
|
# |
46
|
|
|
|
|
|
|
# Implementation of the abstract method from the specific chart class. |
47
|
|
|
|
|
|
|
# |
48
|
|
|
|
|
|
|
# Write the SCATTER chart BIFF record. Defines a scatter chart type. |
49
|
|
|
|
|
|
|
# |
50
|
|
|
|
|
|
|
sub _store_chart_type { |
51
|
|
|
|
|
|
|
|
52
|
1
|
|
|
1
|
|
232
|
my $self = shift; |
53
|
|
|
|
|
|
|
|
54
|
1
|
|
|
|
|
2
|
my $record = 0x101B; # Record identifier. |
55
|
1
|
|
|
|
|
2
|
my $length = 0x0006; # Number of bytes to follow. |
56
|
1
|
|
|
|
|
2
|
my $bubble_ratio = 0x0064; # Bubble ratio. |
57
|
1
|
|
|
|
|
1
|
my $bubble_type = 0x0001; # Bubble type. |
58
|
1
|
|
|
|
|
2
|
my $grbit = 0x0000; # Option flags. |
59
|
|
|
|
|
|
|
|
60
|
1
|
|
|
|
|
6
|
my $header = pack 'vv', $record, $length; |
61
|
1
|
|
|
|
|
2
|
my $data = ''; |
62
|
1
|
|
|
|
|
3
|
$data .= pack 'v', $bubble_ratio; |
63
|
1
|
|
|
|
|
2
|
$data .= pack 'v', $bubble_type; |
64
|
1
|
|
|
|
|
2
|
$data .= pack 'v', $grbit; |
65
|
|
|
|
|
|
|
|
66
|
1
|
|
|
|
|
13
|
$self->_append( $header, $data ); |
67
|
|
|
|
|
|
|
} |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
############################################################################### |
71
|
|
|
|
|
|
|
# |
72
|
|
|
|
|
|
|
# _store_axis_category_stream(). Overridden. |
73
|
|
|
|
|
|
|
# |
74
|
|
|
|
|
|
|
# Write the AXIS chart substream for the chart category. |
75
|
|
|
|
|
|
|
# |
76
|
|
|
|
|
|
|
# For a Scatter chart the category stream is replace with a values stream. We |
77
|
|
|
|
|
|
|
# override this method and turn it into a values stream. |
78
|
|
|
|
|
|
|
# |
79
|
|
|
|
|
|
|
sub _store_axis_category_stream { |
80
|
|
|
|
|
|
|
|
81
|
0
|
|
|
0
|
|
|
my $self = shift; |
82
|
|
|
|
|
|
|
|
83
|
0
|
|
|
|
|
|
$self->_store_axis( 0 ); |
84
|
|
|
|
|
|
|
|
85
|
0
|
|
|
|
|
|
$self->_store_begin(); |
86
|
0
|
|
|
|
|
|
$self->_store_valuerange(); |
87
|
0
|
|
|
|
|
|
$self->_store_tick(); |
88
|
0
|
|
|
|
|
|
$self->_store_end(); |
89
|
|
|
|
|
|
|
} |
90
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
############################################################################### |
93
|
|
|
|
|
|
|
# |
94
|
|
|
|
|
|
|
# _store_marker_dataformat_stream(). Overridden. |
95
|
|
|
|
|
|
|
# |
96
|
|
|
|
|
|
|
# This is an implementation of the parent abstract method to define |
97
|
|
|
|
|
|
|
# properties of markers, linetypes, pie formats and other. |
98
|
|
|
|
|
|
|
# |
99
|
|
|
|
|
|
|
sub _store_marker_dataformat_stream { |
100
|
|
|
|
|
|
|
|
101
|
0
|
|
|
0
|
|
|
my $self = shift; |
102
|
|
|
|
|
|
|
|
103
|
0
|
|
|
|
|
|
$self->_store_dataformat( 0x0000, 0xFFFD, 0x0000 ); |
104
|
|
|
|
|
|
|
|
105
|
0
|
|
|
|
|
|
$self->_store_begin(); |
106
|
0
|
|
|
|
|
|
$self->_store_3dbarshape(); |
107
|
0
|
|
|
|
|
|
$self->_store_lineformat( 0x00000000, 0x0005, 0xFFFF, 0x0008, 0x004D ); |
108
|
0
|
|
|
|
|
|
$self->_store_areaformat( 0x00FFFFFF, 0x0000, 0x01, 0x01, 0x4E, 0x4D ); |
109
|
0
|
|
|
|
|
|
$self->_store_pieformat(); |
110
|
0
|
|
|
|
|
|
$self->_store_markerformat( 0x00, 0x00, 0x02, 0x01, 0x4D, 0x4D, 0x3C ); |
111
|
0
|
|
|
|
|
|
$self->_store_end(); |
112
|
|
|
|
|
|
|
|
113
|
|
|
|
|
|
|
} |
114
|
|
|
|
|
|
|
|
115
|
|
|
|
|
|
|
|
116
|
|
|
|
|
|
|
1; |
117
|
|
|
|
|
|
|
|
118
|
|
|
|
|
|
|
|
119
|
|
|
|
|
|
|
__END__ |