Skip to content
Snippets Groups Projects
Commit e6412a26 authored by alvaro's avatar alvaro
Browse files

added prefixes in line chart

parent aa83f8be
No related branches found
No related tags found
No related merge requests found
......@@ -111,6 +111,10 @@ class Haanga_Extension_Filter_D3LineChart{
$pre = "<div id='".$divId."'></div>
<script src='http://d3js.org/d3.v2.min.js?2.9.3'></script>
<script type='text/javascript'>
//Adding namespaces
d3.ns.prefix['vsr'] = 'http://purl.org/twc/vocab/vsr#';
d3.ns.prefix['rdf'] = 'http://www.w3.org/2000/01/rdf-schema#';
var options_$divId = ".json_encode($options).";
var dataset_$divId = ".json_encode($data).";
var color = d3.scale.category10();
......
......@@ -240,7 +240,7 @@ tooltip_$divId = svg.append('text').style('opacity', 0).style('font-family', 'sa
//Events
d3.selectAll('rect.bar')
.on('mouseover', function(e){
newX = parseFloat(d3.select(this).attr('x')) + 0*parseFloat(d3.select(this).attr('width'));
console.log('asd');
newY = parseFloat(d3.select(this).attr('y'));
if(newY > maxHeight_$divId){
newY -=10;
......@@ -248,6 +248,7 @@ d3.selectAll('rect.bar')
if(newY < 10){
newY +=11;
}
console.log('asd');
tooltip_$divId.style('opacity', 1).attr('y', newY).attr('x', newX).text(e.values);
d3.select(this).style('opacity', 1);
}).on('mouseout', function(){
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment