Coder Social home page Coder Social logo

Comments (6)

neuronetio avatar neuronetio commented on August 18, 2024

I need to make some changes, but it can be done

from gantt-elastic.

neuronetio avatar neuronetio commented on August 18, 2024

there are some references to document in the code,
document is referenced because of font that should be inherited
the font must be consistent with the system in which it is used
font is important because the calendar above the chart measures the width of text and on this basis calculates how many days/hours will fit in a given zoom level
it's graphically calculated by the html5 canvas
If you want the gantt rendering to be done entirely on the server side, you need to find a universal way to measure the width of the text at the given font

from gantt-elastic.

neuronetio avatar neuronetio commented on August 18, 2024

how we can overcome this easily?

from gantt-elastic.

neuronetio avatar neuronetio commented on August 18, 2024

there are some "web safe fonts" that are used everywhere
so we can make (cache) some calculations and save it for server side rendering
gantt will show up, it will be acceptable (can be rendered as image only from the server - pdf also, or just html), but when the front-end app will mount (and css with it) - gantt will behave as it behave now - it will calculate everything without big lag

from gantt-elastic.

neuronetio avatar neuronetio commented on August 18, 2024

in php there is a font lib that can calculate all the measurements we need (width/height) from TTF font.
I don't know if there is something similar in plain JS/WASM
maybe if we know what font will be loaded on the page - we could download it and present gantt ideally

from gantt-elastic.

neuronetio avatar neuronetio commented on August 18, 2024

just add js on the front end and let it happened it's not so much :)
one component could be loaded just in front-end :)

from gantt-elastic.

Related Issues (20)

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.