Compare commits
2 Commits
a76926b2c4
...
783c241e08
Author | SHA1 | Date | |
---|---|---|---|
|
783c241e08 | ||
|
dbc896ece9 |
17769
lib/d3-v5/d3.js
vendored
17769
lib/d3-v5/d3.js
vendored
File diff suppressed because it is too large
Load Diff
2
lib/d3-v5/d3.min.js
vendored
2
lib/d3-v5/d3.min.js
vendored
File diff suppressed because one or more lines are too long
45
lib/d3-v5/doc.js
vendored
45
lib/d3-v5/doc.js
vendored
@ -1,45 +0,0 @@
|
|||||||
//Create a SVG
|
|
||||||
var selection = "div#svg",
|
|
||||||
svgWidth = $(selection).width(),
|
|
||||||
svgHeight = $(selection).height(),
|
|
||||||
svg = d3.select("div#svg").append("svg")
|
|
||||||
.attr("width", svgWidth)
|
|
||||||
.attr("height", svgHeight);
|
|
||||||
|
|
||||||
//Create a responsive SVG
|
|
||||||
var svg = d3.select(html_tag_attr).append("svg")
|
|
||||||
.attr("viewBox", "0 0 "+ svgWidth +" "+ svgHeight)
|
|
||||||
.attr("perserveAspectRatio", "xMinYMid");
|
|
||||||
|
|
||||||
//Create a line chart
|
|
||||||
var line = d3.line()
|
|
||||||
.x(function(d){ return d.date; })
|
|
||||||
.y(function(d){ return d.value; })
|
|
||||||
.curve(d3.curveBasis);
|
|
||||||
|
|
||||||
svg.append("path")
|
|
||||||
.attr("d", line(dataLineChart))
|
|
||||||
.attr("fill", "none")
|
|
||||||
.attr("stroke", "red");
|
|
||||||
|
|
||||||
//Create an horizontal axis
|
|
||||||
var xScale = d3.scaleLinear()
|
|
||||||
.domain([minDomain, maxDomain])
|
|
||||||
.range([minRange, maxRange]);
|
|
||||||
|
|
||||||
var xAxis = d3.axisBottom(xScale);
|
|
||||||
svg.append("g").call(xAxis);
|
|
||||||
//NOTE axisBottom does not mean that axis will be placed at the bottom of the graphic but that ticks of the acis will be placed below the line of the axis
|
|
||||||
//... to place the axis to the bottom of the graphic, you need to replace the line above by the line below
|
|
||||||
svg.append("g")
|
|
||||||
.attr("transform", function(){ return "translate(" + 0 + ", " + height-padding +")"; })
|
|
||||||
.call(xAxis);
|
|
||||||
|
|
||||||
//yAxis with values from bottom to top of the axis
|
|
||||||
var yScale = d3.scaleLinear().range([height, 0]);
|
|
||||||
yScale.domain([0, d3.max(dataLineChart, function(d){ return d.y; })]);
|
|
||||||
|
|
||||||
svg.append("g")
|
|
||||||
.attr("transform", "translate(" + margin.left + ", " + (0 - margin.bottom) + ")")
|
|
||||||
.call(d3.axisLeft(yScale));
|
|
||||||
|
|
18524
lib/d3js/d3-v5.15.0.js
18524
lib/d3js/d3-v5.15.0.js
File diff suppressed because it is too large
Load Diff
@ -26,10 +26,6 @@ if(isset($_POST['submit_change_password'])){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$session_lifetime = 60*60*8;
|
$session_lifetime = 60*60*8;
|
||||||
if(isset($_SESSION['user']) and isset($_SESSION['user']['stay_connected']) and $_SESSION['user']['stay_connected'] == true){
|
if(isset($_SESSION['user']) and isset($_SESSION['user']['stay_connected']) and $_SESSION['user']['stay_connected'] == true){
|
||||||
$session_lifetime = 60*60*24*365*5;
|
$session_lifetime = 60*60*24*365*5;
|
||||||
|
Loading…
Reference in New Issue
Block a user