svg

Using jQuery find to target SVG elements fails in IE only

孤人 提交于 2021-02-20 08:52:18
问题 I'm setting and removing a class on a 'circle' element inside an SVG block with jQuery. This works in all recent browsers I've tested but results in an error in IE (9 & 10, possibly all of them). jQuery(document).ready(function($) { console.log('Console running'); var $circle = $('svg circle'), clicked = false; $circle.on({ click: function(e) { setClick($(this)); } }); function removeClick(callback) { $('svg').find('.clicked').removeAttr("class"); console.log('clicked removed'); callback(); }

Angular / svg - pass data into svg

旧街凉风 提交于 2021-02-19 08:51:20
问题 I have a stackblitz here - https://stackblitz.com/edit/angular-vkwets?file=src%2Fapp%2Fdonuts.template.html I have an Angular component that creates an svg donut chart for each data point of an array passed to the component. I can access the data passed into the component but is it possible to use this in the svg. I would like to update the 'stroke-dasharray' in the svg using the data passed to the component. something like stroke-dasharray=donut.percent 100-donut.perecent <div> <ul> <li

Angular / svg - pass data into svg

徘徊边缘 提交于 2021-02-19 08:51:08
问题 I have a stackblitz here - https://stackblitz.com/edit/angular-vkwets?file=src%2Fapp%2Fdonuts.template.html I have an Angular component that creates an svg donut chart for each data point of an array passed to the component. I can access the data passed into the component but is it possible to use this in the svg. I would like to update the 'stroke-dasharray' in the svg using the data passed to the component. something like stroke-dasharray=donut.percent 100-donut.perecent <div> <ul> <li

How to do an animated dashed svg line?

走远了吗. 提交于 2021-02-19 08:01:05
问题 I've tried to do an animated dashed line in HTML (SVG) / CSS / JS. This is my first svg animation... and clearly... I don't understand anything. First of all, this is my dashed line : <svg id="bf7de8ba-cf75-48ab-a36c-06f8d86635d5" data-name="Calque 1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 690.814 824.302"> <defs> <style> .a00cb6af-c716-4d00-9962-797e598003da, .a6fde9f6-9a2f-4715-ac34-678948a4d015, .b963f74d-80cb-4571-80bd-9cf5cd28cce2 {

SVG bulge on iOS/safari with filter, feGaussianBlur and feColorMatrix

空扰寡人 提交于 2021-02-19 05:38:27
问题 I'm trying to get a gooey effect with svg. Things are fine in chrome, but look weird on Safari & iOS. Here is the example: https://codepen.io/rubenhak/project/editor/ZoBENL How it looks on Chrome: How it looks on Safari/iOS: The problem is when the one circle is too far, too small or missing, the other circle gets bulged. None of this is an issue on chrome. Code: <svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 500 200" width="500"

D3 v3 appending checkbox?

心已入冬 提交于 2021-02-19 05:26:57
问题 Am working with collapsible tree top to bottom orientatin. Here i stuck with some problem. To implement the tree am using d3.v3.js. How can i append check box into the tree for each node. // Create the link lines. svg.selectAll(".link") .data(links) .enter().append("path") .attr("class", "link") .attr("d", d3.svg.diagonal().projection(function(d) { return [o.x(d)+15, o.y(d)]; })); svg.selectAll("input") .data(nodes) .enter().append("foreignObject") .attr('x' , o.x) .attr('y', o.y) .attr(

how to split one path into two paths in svg

断了今生、忘了曾经 提交于 2021-02-19 05:03:13
问题 I'm very new to svg syntax and I want to know how I can split a path into two paths. actually I have something like this: M Xm Ym ... C Xc1 Yc1 Xc2 Yc2 Xc3 Yc3 (*) C Xd1 Yd1 Xd2 Yd2 Xd3 Yd3 C ... (*) is where I want to split the path and I want to convert it to two paths like this: M Am Bm ... C Ac1 Bc1 Ac2 Bc2 Ac3 Bc3 and M An Bn C Ad1 Bd1 Ad2 Bd2 Ad3 Bd3 ... How to calculate A and B numbers by X and Y nums? 回答1: If you can rely on the path commands being absolute (ie capital letters like 'C

how to split one path into two paths in svg

有些话、适合烂在心里 提交于 2021-02-19 05:03:13
问题 I'm very new to svg syntax and I want to know how I can split a path into two paths. actually I have something like this: M Xm Ym ... C Xc1 Yc1 Xc2 Yc2 Xc3 Yc3 (*) C Xd1 Yd1 Xd2 Yd2 Xd3 Yd3 C ... (*) is where I want to split the path and I want to convert it to two paths like this: M Am Bm ... C Ac1 Bc1 Ac2 Bc2 Ac3 Bc3 and M An Bn C Ad1 Bd1 Ad2 Bd2 Ad3 Bd3 ... How to calculate A and B numbers by X and Y nums? 回答1: If you can rely on the path commands being absolute (ie capital letters like 'C

Change d3 force layout link style to match d3-tree look

拜拜、爱过 提交于 2021-02-19 04:22:23
问题 I am undertaking yet another attempt to draw a family tree with d3. For this, I would like to use the usual node-link graph (like this one): But with a link style like that usually found in d3 trees, i.e. be the Bezier curves with horizontal (or vertical) ends: Is it possible to change the links accordingly, without diving into the d3-force code? 回答1: If you are just looking to match the style of the links, no need to dive into the d3-force code, it only calculates position, not anything

Change d3 force layout link style to match d3-tree look

我的梦境 提交于 2021-02-19 04:22:04
问题 I am undertaking yet another attempt to draw a family tree with d3. For this, I would like to use the usual node-link graph (like this one): But with a link style like that usually found in d3 trees, i.e. be the Bezier curves with horizontal (or vertical) ends: Is it possible to change the links accordingly, without diving into the d3-force code? 回答1: If you are just looking to match the style of the links, no need to dive into the d3-force code, it only calculates position, not anything