1 /* simplechartfactory.vala
3 * Copyright (C) 2008 Florian Brosch
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2.1 of the License, or (at your option) any later version.
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20 * Florian Brosch <flo.brosch@gmail.com>
25 public class Valadoc
.Html
.SimpleChartFactory
: Charts
.SimpleFactory
{
26 private Settings _settings
;
27 private Api
.Node _container
;
28 private LinkHelper _linker
;
30 public SimpleChartFactory (Settings settings
, LinkHelper linker
) {
35 public override Gvc
.Graph
create_graph (Api
.Node item
) {
36 var graph
= base.create_graph (item
);
41 protected override Gvc
.Node
configure_type (Gvc
.Node node
, Api
.Node item
) {
42 base.configure_type (node
, item
);
44 if (_container
!= null) {
45 var link
= _linker
.get_relative_link (_container
, item
, _settings
);
47 node
.safe_set ("URL", link
, "");