Wicri:BioMatMimV1/Études techniques
De Wicri Santé
Cette page introduit un ensemble de manipulations réalisées autour de la version BioMatMimV1 du « Serveur d'exploration biomatériau et biomimétisme ».
Premier test SVGGraph
SVGGraph est une bibliothèque PHP pour qui permet de générer des graphiques en SVG.
- Test de faisabilité sur MacBook/MAMP
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link rel="stylesheet" href="Common/styles/ExplorFrame.css" />
<!-- this part is generated by ExplorPhpTools / ExplorGenPhpHeadPage -->
<body>
<?php
require_once('SVGGraph/SVGGraph.php');
$settings = array(
'back_colour' => '#eee', 'stroke_colour' => '#000',
'back_stroke_width' => 0, 'back_stroke_colour' => '#eee',
'pad_right' => 20, 'pad_left' => 20,
'link_base' => '', 'link_target' => '_top',
'show_labels' => true, 'show_label_amount' => true,
'label_font' => 'Georgia', 'label_font_size' => '11',
'label_colour' => '#000', 'units_before_label' => '',
'sort' => false
);
$values = array('Île-de-France' => 59, 'Rhône-Alpes' => 46, 'Alsace' => 31, 'Midi-Pyrénées' => 18, 'Pays de la Loire' => 18,
'Languedoc-Roussillon' => 17,
'Aquitaine' => 14,
'autres' => 35);
$colours = array('#B99','red','#93c','yellow','#f39','#4f3','#339', '#600');
$links = array('Île-de-France' => 'jpegsaver.php', 'Rhône-Alpes' => 'crcdropper.php',
'Alsace' => 'Site/fr/Main/Exploration/indexItem.php?index=AffRegion.i&key=Alsace');
$graph = new SVGGraph(300, 200, $settings);
$graph->colours = $colours;
$graph->Values($values);
$graph->Links($links);
$graph->Render('PieGraph');
echo "<hr/>";
$settings1 = array(
'back_colour' => '#eee', 'stroke_colour' => '#000',
'back_stroke_width' => 0, 'back_stroke_colour' => '#eee',
'pad_right' => 20, 'pad_left' => 20,
'link_base' => '', 'link_target' => '_top',
'show_labels' => true, 'show_label_amount' => true,
'label_font' => 'Georgia', 'label_font_size' => '11',
'label_colour' => '#000', 'units_before_label' => '',
'sort' => false);
$settings1['legend_entries'] =array('Île-de-France' , 'Rhône-Alpes' , 'Alsace' , 'Midi-Pyrénées' , 'Pays de la Loire' , 'Languedoc-Roussillon' , 'Aquitaine' , 'autres' );
$graph1 = new SVGGraph(500, 400, $settings1);
$values1 = array( 59, 46, 31, 18, 18, 17, 14, 35);
$links1 = array('Site/fr/Main/Exploration/indexItem.php?index=AffRegion.i&key=Île-de-France',
'Site/fr/Main/Exploration/indexItem.php?index=AffRegion.i&key=Rhône-Alpes',
'Site/fr/Main/Exploration/indexItem.php?index=AffRegion.i&key=Alsace');
$graph1->Links($links1);
$graph1->Values($values1);
$graph1->Render('PieGraph');
?> <hr/>
</body>
</html>
- Test sur machine Wicri/INPL
<?php
require_once('SVGGraph/SVGGraph.php');
$settings1 = array(
'back_colour' => '#eee', 'stroke_colour' => '#000',
'back_stroke_width' => 0, 'back_stroke_colour' => '#eee',
'pad_right' => 20, 'pad_left' => 20,
'link_base' => '', 'link_target' => '_top',
'show_labels' => true, 'show_label_amount' => true,
'label_font' => 'Georgia', 'label_font_size' => '11',
'label_colour' => '#000', 'units_before_label' => '',
'sort' => false);
$settings1['legend_entries'] =array('Île-de-France' , 'Rhône-Alpes' , 'Alsace' , 'Midi-Pyrénées' , 'Pays de la Loire' , 'Languedoc-Roussillon' , 'Aquitaine' , 'autres' );
$graph1 = new SVGGraph(500, 400, $settings1);
$values1 = array( 59, 46, 31, 18, 18, 17, 14, 35);
$links1 = array('Site/fr/Main/Exploration/indexItem.php?index=AffRegion.i&key=Île-de-France',
'Site/fr/Main/Exploration/indexItem.php?index=AffRegion.i&key=Rhône-Alpes',
'Site/fr/Main/Exploration/indexItem.php?index=AffRegion.i&key=Alsace',
'Site/fr/Main/Exploration/indexItem.php?index=AffRegion.i&key=Midi-Pyrénées',
'Site/fr/Main/Exploration/indexItem.php?index=AffRegion.i&key=Pays de la Loire',
'Site/fr/Main/Exploration/indexItem.php?index=AffRegion.i&key=Languedoc-Roussillon',
'Site/fr/Main/Exploration/indexItem.php?index=AffRegion.i&key=Aquitaine',
'Site/fr/France/Analysis/indexHead.php?index=AffRegion.i'
);
$graph1->Links($links1);
$graph1->Values($values1);
$graph1->Render('PieGraph');
?>