Git Product home page Git Product logo

abstract-visuals's People

Contributors

adamluotonen avatar axel-axelsson avatar bjolind avatar dependabot[bot] avatar dividstefansvensson avatar henbr avatar henbradivid avatar joda-divid avatar johankristiansson avatar johanthorne avatar jonaskello avatar jontem avatar kinatzo avatar xpopy avatar zlafil avatar zyntaax avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

abstract-visuals's Issues

Image + text in same paragraph always ends up on different lines

Trying to create

[ image symbol ] Explanation of symbol

but get them as

[ image symbol ]
Explanation of symbol

even though there is more than enough space to fit both on the same line.

Currently work around this by creating a table and putting them in different cells, but feel unnecessarily complicated.

Missing tests

Missing tests for:

  • abstract-image
  • markdown
  • abstract-document-exporter/pdf/render-image
  • abstract-document-exporter/pdf/pre-process

Add support for 6 digit hex colors

Currently fromString only supports entering ARGB values.
It would be nice to also support RGB values, setting the alpha channel to 255.

AbstractChart - y labels positioning

If the y-axis values are too long they will collide with the y-label (see image for exaple). Could the y label positioning be dynamically decided?

image

AbstractChart - Large axis

There seems to be a memory issue when rendering a chart with large delta value for any of the axis.

Example:

import * as AbstractChart from "abstract-chart";

const chart: AbstractChart.Chart = {
  width: 500,
  height: 500,
  chartPoints: [],
  chartLines: [],
  chartStack: {
    points: [],
    config: [],
    xAxis: "bottom",
    yAxis: "left"
  },
  xAxisBottom: {
    type: "linear",
    min: 0,
    max: 1000000,
    label: ""
  },
  yAxisLeft: undefined,
  yAxisRight: undefined,
  xAxisTop: undefined,
  backgroundColor: {
    a: 255,
    r: 255,
    g: 255,
    b: 255
  },
  gridColor: {
    a: 255,
    r: 128,
    g: 128,
    b: 128
  },
  gridThickness: 1,
  fontSize: 12,
  labelLayout: "center"
};

AbstractChart.renderChart(chart);

Paragraphs that are longer than the available page-body needs to be split

Not a very frequent/urgent issue since few texts are that long, but still something that is not working.

In the example below we have a header, a footer, and a body each with 50 margin. The body consists of one paragraph containing multiple textruns.
The paragraph over-runs both the 50+50 margin between body and footer, and the footer text.

image

Bar & Pie charts are not supported in abstract chart

The readme says:

When drawing complex scientific charts, regular line/bar/pie chart libraries are not very useful. This aim of this library is to enable any chart to be drawn, no matter how complex

Stating that bar and pie charts would be possible with this library, however there is no clear way of creating these in abstract chart.

I managed to make this using the current functionality of abstract-chart:

bild

However, as far as I know,

  1. there's no way to set the fill colour of the pie slices
  2. there's no way to hide the axis completely
  3. the ChartPoint's label is weirdly offset
  4. the pie gets squished even though both width and height is set to 400.

I believe DIAQ has implemented coloured areas locally, so that could be used as reference.

As for bar charts, I believe they suffer the same problems as above.

It would also be quite nice to have examples of a pie chart and bar chart to ease development for other devs looking to use this library.

Split of table not taking into account table margin

If the last row fits on the page but the table doesn't fit due to the margin after the last row, then the split results in empty elements that causes an exception.
Logic needs to take table top/bottom margins into account.

The split table should keep top margin for upper table part while setting bottom to 0, and reverse for lower table where top should be 0 and bottom be kept.

AbstractDocument - Text overflows page width in PDF

The text seems to be split up in 3 parts

image

This is the plain text:

## FAN MOTORS
The AC fans are axial type, 800 [mm] diameter, IP54 grade and equipped with a thermal overload protection. They are also fitted with protection grids on top.

Missing tests

We are missing tests for the following recent functionality:

  • Support for custom font in abstract-chart
  • Support for binaryimage with URL in abstract-image
  • Support for positioning and scaling embedded images in abstract-image

Also missing entries in CHANGELOG.md.

fill color by url does not work

After the change to use lowerCase for fill/stroke/color even in-svg definitions went to lowerCase and do no longer match, e.g. fill="url(#Pattern)"

Suggesting exception to lowerCase if the string contains url.

(This will likely cause problems if anyone uses the namedColor burlywood and spells it with upperCase, but since this is not intended to be a long term solution but only while alafr/SVG-to-PDFKit#152 isn't fixed, that drawback feels acceptable to me.)

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.