Browse Source

fixed graph style

Piotr Labudda 7 years ago
parent
commit
c14d6711e2
3 changed files with 14 additions and 6 deletions
  1. 0 0
      theme/assets/css/styles.css
  2. 0 1
      theme/view/top.php
  3. 14 5
      tools/Bocian.php.graphShowHide.js

File diff suppressed because it is too large
+ 0 - 0
theme/assets/css/styles.css


+ 0 - 1
theme/view/top.php

@@ -247,5 +247,4 @@
         </div>
     </div>
 </div>
-<p id="chart"></p>
 <!-- end:menu -->

+ 14 - 5
tools/Bocian.php.graphShowHide.js

@@ -1,6 +1,7 @@
 var getItemLocalStorage = global.getItemLocalStorage;
 var setItemLocalStorage = global.setItemLocalStorage;
 var p5WFS_GetFeature = global.p5WFS_GetFeature;
+var renderGraph = global.renderGraph; // @from sankey-init
 var DBG = DBG || 0;
 
 function graphShowHide(nameSection) {
@@ -135,18 +136,22 @@ function graphFetchData(node, nameSection) {
 		)
 	).then(function (items) {
 		if(DBG)console.log('p5WFS_GetFeature: items: ', items);
-		graphRender(node, {
+		graphRaportRender({
 			msg: "Pobrano dane",
 			typeName: ('pracownicy' === nameSection) ? 'default_db__x3A__BI_audit_ENERGA_PRACOWNICY:BI_audit_ENERGA_PRACOWNICY' : 'default_db__x3A__BI_audit_ENERGA_RUM_KONTRAHENCI:BI_audit_ENERGA_RUM_KONTRAHENCI',
 			items: items
-		})
+		}, node)
 	}).catch(function (err) {
 		if(DBG)console.log('p5WFS_GetFeature: err: ', err);
-		// graphRender(node, { msg: "Wystąpiły błędy podczas pobierania danych", nameSection: nameSection, err: err })
+		// graphRaportRender({ msg: "Wystąpiły błędy podczas pobierania danych", nameSection: nameSection, err: err }, node)
 	})
 }
 
-function graphRender(wrapNode, props) {
+function graphRender(props, wrapNode) {
+	throw "TODO: graphRender..."
+}
+
+function graphRaportRender(props, wrapNode) {
 	var svgNode = jQuery(wrapNode).children('svg')
 	svgNode = (svgNode.length) ? d3.select(svgNode.get(0)) : d3.select(wrapNode).append("svg")
 	// svg.append("rect").attr("x",0).attr("y",0).attr("width","100%").attr("height","100%").attr("fill","white").attr('class','background').on('mouseup', () => redraw())
@@ -591,4 +596,8 @@ function graphAddNodeLabel(graphNode) {
 }
 
 
-global.graphShowHide = graphShowHide;
+module.exports = {
+	graphShowHide: graphShowHide,
+	graphRender: graphRender,
+	graphRaportRender: graphRaportRender,
+}

Some files were not shown because too many files changed in this diff