Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The documentation for CSV import is faulty, does not produce the desired results #4811

Open
2 tasks done
raindropsfromsky opened this issue Dec 14, 2024 · 0 comments
Open
2 tasks done

Comments

@raindropsfromsky
Copy link

Preflight Checklist

  • I agree to follow the Code of Conduct that this project adheres to.
  • I have searched the issue tracker for a feature request that matches the one I want to file, without success.

You must agree to search and the code of conduct. You must fill in this entire template. If you delete part/all or miss parts out your issue will be closed.

Describe the bug
The documentation for CSV import is wrong in several places.
If we paste this text in Draw.io, it fails to produce the desired diagram.

Extensive proofreading is needed so that new users do not get mislead by erroneous help text:

For example, take this URL: https://github.com/jgraph/drawio-diagrams/blob/dev/examples/csv/basic.txt

  1. Line#32 states
    `## Connections between rows ("from": "sourceColumn", "to": "targetColumn").'

    This should be corrected to-
    ## Connections between **columns** ("from": "sourceColumn", "to": "targetColumn").

  2. Line#37 states that
    ## The label is concatenated in the form: fromlabel + label + tolabel if all are defined.

    I suspect this is wrong: Each edge has three labels: One at each end and one in the middle.
    So the three labels can be specified independently.
    There is no concatenation.

  3. Line#41 states that-
    # connect: {"from": "refs", "to": "id", "style": "curved=1;fontSize=11;"}
    But JSON syntax does not allow semicolon!

  4. Line#43 and 44 state that-

    ## Shape width. Possible value is a number (in px), auto or an @ sign followed by a column
    ## name that contains the value for the width. Default is auto.
    

    But I understood that the key:value pairs always have "%ColumnName%" syntax, not "@ColumnName"
    So in this case, the code should have been width:%ColumnName%, right?
    Or is this an exception to the rule?

  5. The main problem is, there is no help documentation on CSV import at all.
    The documentation jumps to examples (2) without explaining the syntax (1) first.

    image

    This method is very tedious for the reader, who has to infer his learnings from examples.
    He can jump to the wrong conclusions easily!

    Also, it would be better if plain text is used for documentation rather than using code to explain.

  6. I am attaching a draw.io file with examples of code that fails to produce the desired results.

    This could be due to-

    1. My misunderstanding about the syntax (possible because there is no decent documentation about the syntax)
    2. The syntax is correct, but draw.io has a bug.

    Please check!

@m-mohamedin m-mohamedin transferred this issue from jgraph/drawio-desktop Dec 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant