#StackBounty: #javascript #d3.js #svg How to make curved lines to straight lines for Hierarchy Chart using d3.js

Bounty: 50

Source Image

I found one sample example in d3.js with employees hierarchy.I am facing issue while changing the curve lines to straight line like below image.

var attrs = {
    EXPAND_SYMBOL: 'uf067',    
    COLLAPSE_SYMBOL: 'uf068',
    selector: params.selector,
    root: params.data,
    width: params.chartWidth,
    height: params.chartHeight,
    index: 0,
    nodePadding: 9,
    collapseCircleRadius: 7,
    nodeHeight: 50,
    nodeWidth: 210,
    duration: 750,
    rootNodeTopMargin: 20,
    minMaxZoomProportions: [0.05, 3],
    linkLineSize: 180,
    collapsibleFontSize: '10px',
    userIcon: 'uf007',
    nodeStroke: "#ccc",
    nodeStrokeWidth: '1px'
  }

var diagonal = d3.svg.diagonal()
    .projection(function(d) {      
      return [d.x + attrs.nodeWidth / 2, d.y + attrs.nodeHeight / 2];
    });

I have tried with the above two codes.I am unable to get the curves like below Image.Could you help me on this issue.

Target Image
(source: noaa.gov)

Below link is Chart refrence link.

Employees Hierarchy Chart


Get this bounty!!!

#StackBounty: #java #spring #spring-boot #svg #batik Unable to make sense of URL for connection reading a svg file

Bounty: 50

I have a Spring Boot v2.1.2.RELEASE application.
I have a file in ../src/main/resources/icons/128/black/ae.png

which I want to read, But I got an error: Unable to make sense of URL for connection

@SpringBootApplication
public class SvgManagerApplication implements CommandLineRunner {

    public static void main(String[] args) {
        SpringApplication.run(SvgManagerApplication.class, args);
    }


    @Override
    public void run(String... args) throws Exception {      

        try {

            String parser = XMLResourceDescriptor.getXMLParserClassName();
            SAXSVGDocumentFactory f = new SAXSVGDocumentFactory(parser);
            Document doc = f.createDocument("classpath:icons/128/black/ae.svg");

            System.out.println(doc);

        } catch (IOException ex) {

            System.out.println(ex.getMessage());

        }
    }
}


Get this bounty!!!

#StackBounty: #luatex #svg svg output and LuaTeX

Bounty: 200

Trying to find some ways to automate generation of svg output for TeX math formulas, I thought about two possibilities with luatex.

  1. Use lua inside a callback to parse the node tree and output svg (someone had the very idea some time ago).

  2. Use luatex itself to generate svg instead of pdf. As far as I can see, cairo library is included in luatex source code and cairo can output svg.

My questions are:

  1. What is the current status of svg output support with luatex (the program itself or “third parties” projects).
  2. Could I use mplib‘s metapost svg output for that matter? EDIT It seems that mplib does not support svg anymore.


Get this bounty!!!