Builds the grouped layers layout
@return {D3Layout} Layout for drawing the chart
@private
519064
function buildLayers() {
            layers = transformedData.map((item) => {
                let ret = {};

                groups.forEach((key) => {
                    ret[key] = item[key];
                });

                return assign({}, item, ret);
            });
        }
755676
function createLayout(graph, physicsSettings, options) {
    if (!graph) {
        throw new Error('Graph structure cannot be undefined');
    }

    // Update Options file according to input
    if (options) {
        for (var key in options) {
            if (options.hasOwnProperty(key)) {
                Options[key] = options[key];
                console.log(key + ': ' + Options[key]);
            }
        }
    }

    /**
     * Create one simulator for each layer
     */
    var createSimulator = require('ngraph.physics.simulator');
    var physicsSimulators = [];
    for (var i=0;i<graph.layers.length;i++) {
        physicsSimulators[i] = createSimulator(physicsSettings);
    }

    var interLayerDistance = Options.interLayerDistance;
    var nodeBodies = typeof Object.create === 'function' ? Object.create(null) : {};
    var springs = {};

    /**
     * For each layer, create bodies from nodes add the bodies to the corresponding simulator
     */

    initLayers();
    listenToEvents();

    var api = {
        /**
         * Do one step of iterative layout calculation
         * Return true is the current layout is stable
         */
        step: function() {
            var stable = [];
            for (var i=0;i<physicsSimulators.length; i++) {
                stable.push(physicsSimulators[i].step());
            }
            // Check if all simulators are stable
            //console.log(stable);
            for (i=0;i<stable.length;i++) {
                if (!stable[i]) {
                    return false
                }
            }
            return true;
        },

        /**
         * This will return the current position for each node
         * @param nodeId
         * @returns {Vector3d}
         */
        getNodePosition: function (nodeId) {
            var layer = getLayer(nodeId);
            var body = getInitializedBody(nodeId);
            body.pos.z = layer * interLayerDistance;
            return body.pos;
        },

        /**
         * Sets position of a node to a given coordinates
         * @param {string} nodeId node identifier
         * @param {number} x position of a node
         * @param {number} y position of a node
         * @param {number=} z position of node (only if applicable to body)
         */
        setNodePosition: function (nodeId) {
            var body = getInitializedBody(nodeId);
            body.setPosition.apply(body, Array.prototype.slice.call(arguments, 1));
        },

        /**
         * @returns {Object} Link position by link id
         * @returns {Object.from} {x, y} coordinates of link start
         * @returns {Object.to} {x, y} coordinates of link end
         */
        getLinkPosition: function (linkId) {
            var spring = springs[linkId];
            if (spring) {
                return {
                    from: spring.from.pos,
                    to: spring.to.pos
                };
            }
        },

        /**
         * @returns {Object} area required to fit in the graph. Object contains
         * `x1`, `y1` - top left coordinates
         * `x2`, `y2` - bottom right coordinates
         */
        getGraphRect: function () {
            var boxes = [];
            for (var i=0;i<physicsSimulators.length; i++) {
                boxes.push(physicsSimulators[i].getBBox());
            }
            var maxX1 = Math.max.apply(Math,boxes.map(function(o){return o.x1;}));
            var maxY1 = Math.max.apply(Math,boxes.map(function(o){return o.y1;}));
            var maxX2 = Math.max.apply(Math,boxes.map(function(o){return o.x2;}));
            var maxY2 = Math.max.apply(Math,boxes.map(function(o){return o.y2;}));
            return {x1: maxX1, y1: maxY1, x2: maxX2, y2: maxY2, z1: 0, z2: graph.layers.length * interLayerDistance + 15};
        },

        getGraphWidth: function () {
            var boxes = [];
            var box;
            var max = 0;
            var t;
            for (var i=0;i<physicsSimulators.length; i++) {
                box = physicsSimulators[i].getBBox();
                t = Math.max(Math.abs(box.x1 - box.x2), Math.abs(box.y1 - box.y2));
                if (t > max) max = t;
            }
            return max;
        },

        /*
         * Requests layout algorithm to pin/unpin node to its current position
         * Pinned nodes should not be affected by layout algorithm and always
         * remain at their position
         */
        pinNode: function (node, isPinned) {
            var body = getInitializedBody(node.id);
            body.isPinned = !!isPinned;
        },

        /**
         * Checks whether given graph's node is currently pinned
         */
        isNodePinned: function (node) {
            return getInitializedBody(node.id).isPinned;
        },

        /**
         * Request to release all resources
         */
        dispose: function() {
            graph.off('changed', onGraphChanged);
            for (var i=0;i<physicsSimulators.length; i++) {
                physicsSimulators[i].off('stable', onStableChanged);
            }
        },

        /**
         * Sets the inter layer distance
         */
        setInterLayerDistance: function (dist) {
            interLayerDistance = dist;
        },

        /**
         * Gets physical body for a given node id. If node is not found undefined
         * value is returned.
         */
        getBody: getBody,

        /**
         * Gets spring for a given edge.
         *
         * @param {string} linkId link identifer. If two arguments are passed then
         * this argument is treated as formNodeId
         * @param {string=} toId when defined this parameter denotes head of the link
         * and first argument is trated as tail of the link (fromId)
         */
        getSpring: getSpring,

        /**
         * [Read only] Gets current physics simulator
         */
        simulator: {},

        /**
         * Update physics settings
         */
        updatePhysics: updatePhysics,

        makeStable: function () {
            onStableChanged(true);
        }


    };

    eventify(api);
    return api;

    function listenToEvents() {
        graph.on('changed', onGraphChanged);
        for (var i=0;i<physicsSimulators.length;i++) {
            physicsSimulators[i].on('stable', onStableChanged);
        }
        //physicsSimulators[0].on('stable', onStableChanged);
    }

    function onStableChanged(isStable) {
        console.log('Stable has changed!');
        api.fire('stable', isStable);
    }

    function onGraphChanged(changes) {
        for (var i = 0; i < changes.length; ++i) {
            var change = changes[i];
            if (change.changeType === 'add') {
                if (change.node) {
                    initBody(change.node.id);
                }
                if (change.link) {
                    initLink(change.link);
                }
            } else if (change.changeType === 'remove') {
                if (change.node) {
                    releaseNode(change.node);
                }
                if (change.link) {
                    releaseLink(change.link);
                }
            }
        }
    }


    function getSpring(fromId, toId) {
        var linkId;
        if (toId === undefined) {
            if (typeof fromId !== 'object') {
                // assume fromId as a linkId:
                linkId = fromId;
            } else {
                // assume fromId to be a link object:
                linkId = fromId.id;
            }
        } else {
            // toId is defined, should grab link:
            var link = graph.hasLink(fromId, toId);
            if (!link) return;
            linkId = link.id;
        }
        console.log("Hello I'm here as well!");

        return springs[linkId];
    }

    function getLayer(nodeId) {
        var node = graph.getNode(nodeId);
        return graph.layers.indexOf(node.data.get('layer').get('id')); // Return the index of the layer of node
    }

    function initLayers() {
        graph.forEachNode(function (node) {
            var layer = getLayer(node.id);
            initBody(node.id, layer);
        });
        graph.forEachLink(initLink);
    }

    function initBody(nodeId, layer) {
        var body = nodeBodies[nodeId];
        if (!body) {
            var node = graph.getNode(nodeId);
            if (!node) {
                throw new Error('initBody() was called with unknown node id');
            }
        }

        var pos = node.position;
        if (!pos) {
            var neighbors = getNeighborBodies(node);
            pos = physicsSimulators[layer].getBestNewBodyPosition(neighbors);
        }

        body = physicsSimulators[layer].addBodyAt(pos);

        nodeBodies[nodeId] = body;
        updateBodyMass(nodeId);


        if (isNodeOriginallyPinned(node)) {
            body.isPinned = true;
        }

        //TODO: Does this work??
    }

    function getBody(nodeId) {
        return nodeBodies[nodeId];
    }

    function releaseNode(node) {
        var nodeId = node.id;
        var body = nodeBodies[nodeId];
        if (body) {
            nodeBodies[nodeId] = null;
            delete nodeBodies[nodeId];

            physicsSimulator.removeBody(body); //TODO: update for multilayer layout
        }
    }

    function initLink(link) {
        updateBodyMass(link.fromId);
        updateBodyMass(link.toId);


        // Only add springs for intra-layer links
        var layer = graph.getNode(link.toId).data.get('layer').get('id'); // One node is enough to get layer
        var layerindex = getLayer(link.toId);
        if (checkLinkLayer(graph.getNode(link.fromId), graph.getNode(link.toId), layer)) {
            var fromBody = nodeBodies[link.fromId],
                toBody  = nodeBodies[link.toId],
                spring = physicsSimulators[layerindex].addSpring(fromBody, toBody, link.length);
            noop(link, spring);
            springs[link.id] = spring;
        }
    }

    function releaseLink(link) {
        var spring = springs[link.id];
        if (spring) {
            var from = graph.getNode(link.fromId),
                to = graph.getNode(link.toId);

            if (from) updateBodyMass(from.id);
            if (to) updateBodyMass(to.id);

            delete springs[link.id];

            physicsSimulator.removeSpring(spring);
        }
    }


    /**
     * Checks whether graph node has in its settings pinned attribute,
     * which means layout algorithm cannot move it. Node can be preconfigured
     * as pinned, if it has "isPinned" attribute, or when node.data has it.
     *
     * @param {Object} node a graph node to check
     * @return {Boolean} true if node should be treated as pinned; false otherwise.
     */
    function isNodeOriginallyPinned(node) {
        return (node && (node.isPinned || (node.data && node.data.isPinned)));
    }

    function getInitializedBody(nodeId) {
        var body = nodeBodies[nodeId];
        if (!body) {
            initBody(nodeId);
            body = nodeBodies[nodeId];
        }
        return body;
    }

    function getNeighborBodies(node, layer) {
        // set maxNeighbors to min of 2 or number of intra-layer(!) links
        var neighbors = [];
        if (!node.links) {
            return neighbors;
        }
        var sameLayerLinks = getSameLayerLinks(node,layer);
        var maxNeighbors = Math.min(sameLayerLinks.length, 2);
        for (var i=0;i<maxNeighbors; i++) {
            var link = sameLayerLinks[i];
            var otherBody = link.fromId !== node.id ? nodeBodies[link.fromId] : nodeBodies[link.toId];
            if (otherBody && otherBody.pos) {
                neighbors.push(otherBody);
            }
        }

        return neighbors;
    }

    function getSameLayerLinks(node, layer) {
        var res = [];
        var n1, n2;
        for (var i=0;i<node.links.length;i++) {
            n1 = graph.getNode(node.links[i].toId);
            n2 = graph.getNode(node.links[i].fromId);
            if (checkLinkLayer(n1, n2, layer) ) {
                res[i] = node.links[i];
            }
        }
        return res;
    }

    function checkLinkLayer(node1, node2, layer) {
        return node1.data.get('layer').get('id') == layer && node2.data.get('layer').get('id') == layer;
    }

    function updateBodyMass(nodeId) {
        var body = nodeBodies[nodeId];
        body.mass = nodeMass(nodeId);
    }

    /**
     * Calculates mass of a body, which corresponds to node with given id.
     *
     * @param {String|Number} nodeId identifier of a node, for which body mass needs to be calculated
     * @returns {Number} recommended mass of the body;
     */
    function nodeMass(nodeId) {
        var links = graph.getLinks(nodeId);
        if (!links) return 1;
        return 1 + links.length / 4.0;
    }


    function updatePhysics(settings) {
        for (key in settings) {
            if (settings.hasOwnProperty(key)) {
                for (var i = 0; i < physicsSimulators.length; i++) {
                    if (physicsSimulators[i][key]) {
                        physicsSimulators[i][key](settings[key]);
                    }
                }
            }
        }
        for (i = 0; i < physicsSimulators.length; i++) {
            physicsSimulators[i].fire('stable', false);
            physicsSimulators[i].step();
        }
    }

}
363875
function _LayoutCommon_getGroupInfo(groupIndex) {
                    var group = this._site.groupFromIndex(groupIndex),
                        groupInfo = this._groupInfo,
                        margins = this._sizes.containerMargins,
                        adjustedInfo = { enableCellSpanning: false };

                    groupInfo = (typeof groupInfo === "function" ? groupInfo(group) : groupInfo);
                    if (groupInfo) {
                        if (groupInfo.enableCellSpanning && (+groupInfo.cellWidth !== groupInfo.cellWidth || +groupInfo.cellHeight !== groupInfo.cellHeight)) {
                            throw new _ErrorFromName("WinJS.UI.GridLayout.GroupInfoResultIsInvalid", strings.groupInfoResultIsInvalid);
                        }
                        adjustedInfo = {
                            enableCellSpanning: !!groupInfo.enableCellSpanning,
                            cellWidth: groupInfo.cellWidth + margins.left + margins.right,
                            cellHeight: groupInfo.cellHeight + margins.top + margins.bottom
                        };
                    }

                    return adjustedInfo;
                }
246500
private static void doLayout(
            final Graphics2D graphics2d, final ScalebarAttributeValues scalebarParams,
            final ScaleBarRenderSettings settings) {
        final Dimension maxLabelSize = getMaxLabelSize(settings);

        int numSubIntervals = 1;
        if (scalebarParams.subIntervals) {
            numSubIntervals = getNbSubIntervals(
                    settings.getScaleUnit(), settings.getIntervalLengthInWorldUnits(),
                    settings.getIntervalUnit());
        }

        settings.setBarSize(getBarSize(settings));
        settings.setLabelDistance(getLabelDistance(settings));
        settings.setLineWidth(getLineWidth(settings));
        settings.setSize(getSize(scalebarParams, settings, maxLabelSize));
        settings.setMaxLabelSize(maxLabelSize);
        settings.setNumSubIntervals(numSubIntervals);

        ScalebarDrawer drawer = scalebarParams.getType().createDrawer(graphics2d, settings);
        drawer.draw();
    }
932781
function buildScales(){
            let minX = d3Array.min(dataByTopic, ({dates}) => d3Array.min(dates, getDate)),
                maxX = d3Array.max(dataByTopic, ({dates}) => d3Array.max(dates, getDate)),
                maxY = d3Array.max(dataByTopic, ({dates}) => d3Array.max(dates, getValue)),
                minY = d3Array.min(dataByTopic, ({dates}) => d3Array.min(dates, getValue));
            let yScaleBottomValue = Math.abs(minY) < 0 ? Math.abs(minY) : 0;

            xScale = d3Scale.scaleTime()
                .domain([minX, maxX])
                .rangeRound([0, chartWidth]);

            yScale = d3Scale.scaleLinear()
                .domain([yScaleBottomValue, Math.abs(maxY)])
                .rangeRound([chartHeight, 0])
                .nice();

            colorScale = d3Scale.scaleOrdinal()
                .range(colorSchema)
                .domain(dataByTopic.map(getTopic));

            let range = colorScale.range();

            topicColorMap = colorScale.domain().reduce((memo, item, i) => {
                memo[item] = range[i];

                return memo;
            }, {});
        }
620805
function () {
                        var t = d3.select(this).selectAll("text");
                        if (!axis.measure && axis._max > 0) {
                            if (axis.position === "x") {
                                t.attr("x", (chartWidth / axis._max) / 2);
                            } else if (axis.position === "y") {
                                t.attr("y", -1 * (chartHeight / axis._max) / 2);
                            }
                        }
                        if (axis.categoryFields && axis.categoryFields.length > 0) {
                            // Off set the labels to counter the transform.  This will put the labels along the outside of the chart so they
                            // don't interfere with the chart contents
                            if (axis === firstX && (firstY.categoryFields === null || firstY.categoryFields.length === 0)) {
                                t.attr("y", chartY + chartHeight - firstY._scale(0) + 9);
                            }
                            if (axis === firstY && (firstX.categoryFields === null || firstX.categoryFields.length === 0)) {
                                t.attr("x", -1 * (firstX._scale(0) - chartX) - 9);
                            }
                        }
                        return this;
                    }
553743
function() {

        // layers list div
        this.layersDiv = document.createElement("div");
        this.layersDiv.id = this.id + "_layersDiv";
        OpenLayers.Element.addClass(this.layersDiv, "layersDiv");

        this.baseLbl = document.createElement("div");
        this.baseLbl.innerHTML = OpenLayers.i18n("Base Layer");
        OpenLayers.Element.addClass(this.baseLbl, "baseLbl");

        this.baseLayersDiv = document.createElement("div");
        OpenLayers.Element.addClass(this.baseLayersDiv, "baseLayersDiv");

        this.dataLbl = document.createElement("div");
        this.dataLbl.innerHTML = OpenLayers.i18n("Overlays");
        OpenLayers.Element.addClass(this.dataLbl, "dataLbl");

        this.dataLayersDiv = document.createElement("div");
        OpenLayers.Element.addClass(this.dataLayersDiv, "dataLayersDiv");

        if (this.ascending) {
            this.layersDiv.appendChild(this.baseLbl);
            this.layersDiv.appendChild(this.baseLayersDiv);
            this.layersDiv.appendChild(this.dataLbl);
            this.layersDiv.appendChild(this.dataLayersDiv);
        } else {
            this.layersDiv.appendChild(this.dataLbl);
            this.layersDiv.appendChild(this.dataLayersDiv);
            this.layersDiv.appendChild(this.baseLbl);
            this.layersDiv.appendChild(this.baseLayersDiv);
        }

        this.div.appendChild(this.layersDiv);

        // maximize button div
        var img = OpenLayers.Util.getImageLocation('layer-switcher-maximize.png');
        this.maximizeDiv = OpenLayers.Util.createAlphaImageDiv(
                                    "OpenLayers_Control_MaximizeDiv",
                                    null,
                                    null,
                                    img,
                                    "absolute");
        OpenLayers.Element.addClass(this.maximizeDiv, "maximizeDiv olButton");
        this.maximizeDiv.style.display = "none";

        this.div.appendChild(this.maximizeDiv);

        // minimize button div
        var img = OpenLayers.Util.getImageLocation('layer-switcher-minimize.png');
        this.minimizeDiv = OpenLayers.Util.createAlphaImageDiv(
                                    "OpenLayers_Control_MinimizeDiv",
                                    null,
                                    null,
                                    img,
                                    "absolute");
        OpenLayers.Element.addClass(this.minimizeDiv, "minimizeDiv olButton");
        this.minimizeDiv.style.display = "none";

        this.div.appendChild(this.minimizeDiv);
    }
948805
def layout
      # This assumes that the container overlaps all the children.

      # Move all children if we have moved.
      @children.each.with_index do |child, index|
        child.x = padding_left + x
        child.y = padding_top + y
      end

      # Make us as wrap around the largest child.
      rect.width = (@children.map {|c| c.width }.max || 0) + padding_left + padding_right
      rect.height = (@children.map {|c| c.height }.max || 0) + padding_top + padding_bottom

      super
    end
1173768
function BuildLayout(layoutObject) {
    let finishedLayout = {
        start: "",
        end: "",
    };

    if (layoutObject) {
        const layout = new Layout(layoutObject.template);
        finishedLayout.start = `${layout.html.start}<head>${layoutObject.head}<style>${layoutObject.css}</style></head>${layout.body.start}${layout.template.start}`;
        finishedLayout.end = `${layout.template.end}${BuildScript(layoutObject.script)}${layout.body.end}${layout.html.end}`;
    } else {
        throw new Error("Missing Layout Object");
    }

    return finishedLayout;
}
1280135
function setupChart(data) {
  var margin = {top: 20, right: 20, bottom: 30, left: 40},
    width = 800 - margin.left - margin.right,
    height = 400 - margin.top - margin.bottom;

  color = d3.scaleInteractive('color', updateChart)
    .scaleSequential(d3.interpolateMagma)
    // .scaleOrdinal(d3.schemeCategory10)
    .domain(d3.extent(data, function (d) { return d.v; }));

  x = d3.scaleInteractive('x', updateChart)
  // x = d3
      .scaleLinear()
      .domain(d3.extent(data, function (d) { return d.x; }))
      .range([0, width]);

  // switch to this for time
  // x = d3.scaleInteractive('x', updateChart)
  // // x = d3
      // .scaleTime()
      // .domain(d3.extent(data, function (d) { return d.x; }))
      // .range([0, width]);


  // switch to this for categorical and comment out x.domain(d3.extent ...) below
  // x = d3.scaleInteractive('cat', updateChart)
  // // x = d3
      // .scalePoint()
      // .domain(categories)
      // .range([0, width]);

  y = d3.scaleInteractive('y', updateChart)
  // y = d3
      .scaleLinear()
      .domain(d3.extent(data, function (d) { return d.y; }))
      .range([height, 0]);


  xAxis = d3.axisBottom(x);
  yAxis = d3.axisLeft(y);

  svg = d3.select('.chart-container').append('svg')
      .attr('width', width + margin.left + margin.right)
      .attr('height', height + margin.top + margin.bottom)
    .append('g')
      .attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');


  x.domain(d3.extent(data, function(d) { return d.x; })).nice(); // comment this out for categorical
  y.domain(d3.extent(data, function(d) { return d.y; })).nice();

  svg.append('g')
      .attr('class', 'x axis')
      .attr('transform', 'translate(0,' + height + ')')

  svg.append('g')
      .attr('class', 'y axis')

  updateChart(data);
}
1018976
function () {
		var series = this,
			chart = series.chart,
			renderer = chart.renderer,
			groupTranslation,
			//center,
			graphic,
			group,
			shadow = series.options.shadow,
			shadowGroup,
			shapeArgs;


		// draw the slices
		each(series.data, function (point) {
			graphic = point.graphic;
			shapeArgs = point.shapeArgs;
			group = point.group;
			shadowGroup = point.shadowGroup;

			// put the shadow behind all points
			if (shadow && !shadowGroup) {
				shadowGroup = point.shadowGroup = renderer.g('shadow')
					.attr({ zIndex: 4 })
					.add();
			}

			// create the group the first time
			if (!group) {
				group = point.group = renderer.g('point')
					.attr({ zIndex: 5 })
					.add();
			}

			// if the point is sliced, use special translation, else use plot area traslation
			groupTranslation = point.sliced ? point.slicedTranslation : [chart.plotLeft, chart.plotTop];
			group.translate(groupTranslation[0], groupTranslation[1]);
			if (shadowGroup) {
				shadowGroup.translate(groupTranslation[0], groupTranslation[1]);
			}


			// draw the slice
			if (graphic) {
				graphic.animate(shapeArgs);
			} else {
				point.graphic =
					renderer.arc(shapeArgs)
					.attr(extend(
						point.pointAttr[NORMAL_STATE],
						{ 'stroke-linejoin': 'round' }
					))
					.add(point.group)
					.shadow(shadow, shadowGroup);
			}

			// detect point specific visibility
			if (point.visible === false) {
				point.setVisible(false);
			}

		});

	}
231036
function renderComponent() {
    const data = [[0.1, 0.15], [0.2, 0.3], [0.4, 0.6], [0.8, 0.9]];
    var svg = d3.select('svg')
      .datum(data);
    svg.select('.horizontal')
      .call(horizontalSvgBand);
    svg.select('.vertical')
      .call(verticalSvgBand);

    var canvas = d3.select('canvas').node();
    var ctx = canvas.getContext('2d');
    horizontalCanvasBand.context(ctx)(data);
    verticalCanvasBand.context(ctx)(data);
}
1231547
def layout_(self, chart_objs, cols=3):
        
        try:
            return hv.Layout(chart_objs).cols(cols)
        except Exception as e:
            self.err(e, self.layout_, "Can not build layout")
93739
function showEmbedding(data) {
  const margin = {top: 20, right: 15, bottom: 60, left: 60};
  const width = 800 - margin.left - margin.right;
  const height = 800 - margin.top - margin.bottom;

  const x = d3.scaleLinear().domain([0, 1]).range([0, width]);
  const y = d3.scaleLinear().domain([0, 1]).range([height, 0]);

  const chart = d3.select('body')
                    .append('svg')
                    .attr('width', width + margin.right + margin.left)
                    .attr('height', height + margin.top + margin.bottom)
                    .attr('class', 'chart');

  const main =
      chart.append('g')
          .attr(
              'transform', 'translate(' + margin.left + ',' + margin.top + ')')
          .attr('width', width)
          .attr('height', height)
          .attr('class', 'main');

  const xAxis = d3.axisBottom(x);
  main.append('g')
      .attr('transform', 'translate(0,' + height + ')')
      .attr('class', 'main axis date')
      .call(xAxis);

  const yAxis = d3.axisLeft(y);
  main.append('g')
      .attr('transform', 'translate(0,0)')
      .attr('class', 'main axis date')
      .call(yAxis);

  const dots = main.append('g');

  dots.selectAll('scatter-dots')
      .data(data)
      .enter()
      .append('svg:circle')
      .attr('cx', (d) => x(d[0]))
      .attr('cy', (d) => y(d[1]))
      .attr('stroke-width', 0.25)
      .attr('stroke', '#1f77b4')
      .attr('fill', 'none')
      .attr('r', 5);
}
483652
function() {
        var heightSegments = this.heightSegments;
        var widthSegments = this.widthSegments;
        var attributes = this.attributes;
        var positions = [];
        var texcoords = [];
        var normals = [];
        var faces = [];

        for (var y = 0; y <= heightSegments; y++) {
            var t = y / heightSegments;
            for (var x = 0; x <= widthSegments; x++) {
                var s = x / widthSegments;

                positions.push([2 * s - 1, 2 * t - 1, 0]);
                if (texcoords) {
                    texcoords.push([s, t]);
                }
                if (normals) {
                    normals.push([0, 0, 1]);
                }
                if (x < widthSegments && y < heightSegments) {
                    var i = x + y * (widthSegments + 1);
                    faces.push([i, i + 1, i + widthSegments + 1]);
                    faces.push([i + widthSegments + 1, i + 1, i + widthSegments + 2]);
                }
            }
        }

        attributes.position.fromArray(positions);
        attributes.texcoord0.fromArray(texcoords);
        attributes.normal.fromArray(normals);

        this.initIndicesFromArray(faces);

        this.boundingBox = new BoundingBox();
        this.boundingBox.min.set(-1, -1, 0);
        this.boundingBox.max.set(1, 1, 0);
    }
28386
function D3Renderer(view, graphData, options) {

        /**
         * View stack
         *
         * @property view
         * @param Array
         */
        this.view = view;

        /**
         * graph Data
         *
         * @property graph
         * @param Object
         */
        this.graph = graphData;

        /**
         * (Default merged) option
         *
         * @property option
         * @type Object
         */
        this.option = mixin(defaultOptions, options || {});

        /**
         * Canvas container
         *
         * @property container
         * @type d3-element-array
         */
        this.container = null;

        /**
         * SVG container
         *
         * @property svg
         * @type d3-element-array
         */
        this.svg = null;

        /**
         * force reloader
         *
         * @property force
         * @type d3-element-array
         */
        this.force = null;

        /**
         * link elements
         *
         * @property link
         * @type d3-element-array
         */
        this.link = null;

        /**
         * Node elements
         *
         * @property node
         * @type d3-element-array
         */
        this.node = null;

        /**
         * test elements
         *
         * @property text
         * @type d3-element-array
         */
        this.text = null;

        /**
         * d3 color object
         *
         * @property color
         * @type Object
         */
        this.color = d3.scale.category20();

        /**
         * selected index
         *
         * @property selectedIdx
         * @type Number
         * @default -1
         */
        this.selectedIdx = -1;

        /**
         * selected type
         *
         * @property selectedType
         * @type String
         * @default "normal"
         */
        this.selectedType = 'normal';

        /**
         * selected object
         *
         * @property selectedObject
         * @type Object
         */
        this.selectedObject = {};


        // Scope trick
        this.radius   = this.radius();
        this.linkLine = this.linkLine();
    }
793052
function buildContainerGroups(){
            let container = svg
              .append('g')
                .classed('container-group', true)
                .attr('transform', `translate(${margin.left},${margin.top})`);

            container
              .append('g').classed('x-axis-group', true)
              .append('g').classed('axis x', true);
            container.selectAll('.x-axis-group')
              .append('g').classed('month-axis', true);
            container
              .append('g').classed('y-axis-group', true)
              .append('g').classed('axis y', true);
            container
              .append('g').classed('grid-lines-group', true);
            container
              .append('g').classed('chart-group', true);
            container
              .append('g').classed('metadata-group', true);
        }