Giter Club home page Giter Club logo

treemap-squared's Issues

Uncaught ReferenceError: Raphael is not defined

I'm pretty new to coding in general. Love this simple way to create a tree map. I'm getting the following error:
Uncaught ReferenceError: Raphael is not defined
at Object.draw (treemap-squared-0.5.min.js:175)
at HTMLDocument. (Test.html:18)
at o (jquery.min.js:2)
at Object.fireWith (jquery.min.js:2)
at Function.ready (jquery.min.js:2)
at HTMLDocument.B (jquery.min.js:2)

Cannot get arbitary depth levels to work.

My example of

data = [1,[2,3]];
labels = ["1", ["2", "3"]];
Treemap.draw("TreeMap", 1800, 600, data, labels);

Hands back

<svg height="600" version="1.1" width="1800" xmlns="http://www.w3.org/2000/svg" style="overflow: 
hidden; position: relative;">
<desc>Created with Raphaël 2.1.0</desc>
<defs>
<rect x="0" y="0" width="1800" height="600" r="0" rx="0" ry="0" fill="none" stroke="#000" style="">
<rect x="0" y="0" width="0" height="0" r="0" rx="0" ry="0" fill="#006628" stroke="#000000" style="">
<text style="text-anchor: middle; font: 10px "Arial";" x="0" y="0" text-anchor="middle" font="10px     "Arial""     stroke="none" fill="#fcfcfc" font-size="NaNpx">
<tspan dy="3.5">1</tspan>
</text>
<rect x="0" y="0" width="0" height="0" r="0" rx="0" ry="0" fill="#006628" stroke="#000000" style="">
<text style="text-anchor: middle; font: 10px "Arial";" x="0" y="0" text-anchor="middle" font="10px "Arial""    stroke="none" fill="#fcfcfc" font-size="NaNpx">
<tspan dy="3.5">2,3</tspan>
</text>
</svg>

The cords and sizes all seem to become zeroed.

Size

I was trying to style nodes based on CSS, and it is proving difficult as the nodes generated are look appropriate when stacked on top of one another because of their x and y offset, however their size is much larger than it needs to be. This causes problems with adding other elements to the DOM. Suggestions?

htmlelement

Generate breaks on matrices that arent n-square

If the matrix i send to generate is not squared on any depth level it generates NaNs or has reference errors.
Checking the source code i saw that the array dimensions are looked only on the first array, i think that fixing this is not so easy as it is a hipothesis spread over the code.
Is there another tree generator library around ?
If i dont find another lib to do this, on any languaje (through wasm at least) i will fix it but i know it probably wont get to be accepted as the mantainer is apparently gone, so i will document what happens here for the next. Cheers

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.