svg

Annotation connectors blocking tooltips

孤者浪人 提交于 2021-01-28 10:40:23
问题 I am creating a line plot with tooltips appearing on hovering over the data points using d3. However, I added a few annotations to the plot and the callout circles now block the tooltips from appearing on the points overlapped by the annotations. The following is a screenshot of the tooltip appearing on the points, but it doesn't appear on the point overlayed by the annotation circle (grey circle on the image). The code used to generate the line plot, the points, tooltip and annotations are

Annotation connectors blocking tooltips

三世轮回 提交于 2021-01-28 10:39:42
问题 I am creating a line plot with tooltips appearing on hovering over the data points using d3. However, I added a few annotations to the plot and the callout circles now block the tooltips from appearing on the points overlapped by the annotations. The following is a screenshot of the tooltip appearing on the points, but it doesn't appear on the point overlayed by the annotation circle (grey circle on the image). The code used to generate the line plot, the points, tooltip and annotations are

Annotation connectors blocking tooltips

岁酱吖の 提交于 2021-01-28 10:34:33
问题 I am creating a line plot with tooltips appearing on hovering over the data points using d3. However, I added a few annotations to the plot and the callout circles now block the tooltips from appearing on the points overlapped by the annotations. The following is a screenshot of the tooltip appearing on the points, but it doesn't appear on the point overlayed by the annotation circle (grey circle on the image). The code used to generate the line plot, the points, tooltip and annotations are

Firefox ESR 68 doesn't support rem units in an svg's dimensions. Workarounds?

久未见 提交于 2021-01-28 09:40:26
问题 Update: This is a missing feature, and is being worked on: https://bugzilla.mozilla.org/show_bug.cgi?id=1287054 I have this svg icon on my web portfolio (the Tor Project icon), which is at https://dougsilva.me/. If you open this page on Firefox ESR 68, it will ignore rem values in the width and height of the svg, making the icon have an inconsistent size compared to the other icons from FontAwesome. Its size will be nearly doubled. <svg id="torproject_icon" width="5.5rem" height="5.5rem"

How can I change http:// linked images in Inkscape 0.92 to embedded ones?

有些话、适合烂在心里 提交于 2021-01-28 08:08:58
问题 I'm using Inkscape 0.92 for OS X from the official download page (https://inkscape.org/en/release/0.92.2/mac-os-x/), but I can't seem to get it to load images that have been included using http, for instance, an SVG like this <svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="950" height="717"> <image width="120" height="120" preserveAspectRatio="none" xlink:href="https://media.inkscape.org/media/cms_page_media/328/Inkscape_Logo2.png"/> <

Can you use CSS selectors on SVG rendered via CSS Data URI?

好久不见. 提交于 2021-01-28 07:54:48
问题 I have some inline SVG with class names for styling via CSS selectors. I would like to bring the SVG into my CSS as a background-image data URI, but does this mean I can't use the CSS selectors anymore? I've read the existing StackOverflow responses, and the takeaway seems to be "You can't apply CSS because it's an image or resource from potentially another site". How do I change the colour of an SVG image in a CSS content property? Modify SVG fill color when being served as Background-Image

Why am I failing to rotate a path around a given point in SVG

橙三吉。 提交于 2021-01-28 07:41:23
问题 Let's consider this SVG file from Openclipart (link to raw SVG file). For reference, it looks like this: I now want to rotate the hands so that I can make the clock show some arbitrary time. I have determined that the hour hand is encoded by this path element: <path d="m 458.13588,295.06406 c 1.74675,-16.11195 25.92429,-46.33386 37.207,-59.62773 l -0.0945,-0.0895 c -12.66188,11.97753 -41.49863,37.74816 -57.33149,40.35684 -30.58445,5.03466 -23.84883,26.09555 -19.57494,34.86553 l -52.97792,55

React : Returning SVG contents as variable?

偶尔善良 提交于 2021-01-28 07:25:21
问题 I am currently doing this: class Checked extends React.Component { render() { return ( <svg width="24" fill="#00ea00" height="24" viewBox="0 0 24 24"> <path d="M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"/> </svg> ); } } But I would like to be doing something like this: import imgTable from '../img/catering_table.svg' class Checked extends React.Component { render() { return imgTable; } } Why does this not work? Am I returning the variable here and not the actual contents? I would have

SVG viewbox error with React

时间秒杀一切 提交于 2021-01-28 07:23:57
问题 I cannot for the life of me figure out what's going wrong here. I have the following component: import React, { Component } from 'react'; class MySvg extends Component { render() { return ( <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 {this.props.width} {this.props.height}"></svg> ); } } export default MySvg; When I try to render the component, I get the following error: Error: <svg> attribute viewBox: Expected number, "0 0 {this.props.widt…"... I am 100% sure that both props are

How to update d3-force elements?

江枫思渺然 提交于 2021-01-28 07:10:52
问题 I want to update d3-force elements when click, but I find something wrong. What I want is: generate all links first then generate all nodes, so that the node can override the link So when clicked the elements should be: <svg> <line ...></line> <line ...></line> <line ...></line> <line ...></line> <g><circle ...></circle></g> <g><circle ...></circle></g> <g><circle ...></circle></g> <g><circle ...></circle></g> <g><circle ...></circle></g> </svg> But I get: <svg> <g><circle ...></circle></g>