obsidian-charts icon indicating copy to clipboard operation
obsidian-charts copied to clipboard

[Bug]: Fail to create chart from table

Open OxideCalcium opened this issue 2 years ago • 12 comments

Describe the bug

When select a whole Markdown-Table and run the Command "Create Chart from Table", i only receive table malformed. When use block ID, i just receive "There is no table at that id and/or file".

Relevant errors (if available)

No response

Steps to reproduce

A.Select a whole Markdown-Table and run the Command "Create Chart from Table", then i meet the error. B.Follow the steps provided in manual, then i meet the error "There is no table at that id and/or file". I can assure the block id is right. Besides, other functions like insert a new chart seem to work well.

Expected Behavior

No response

Additional context

No response

Code

No response

Operating system

Windows

OxideCalcium avatar Oct 22 '23 16:10 OxideCalcium

Confirming same issue in OSX when using "id:" for a table that exists on the same markdown page (working before the update run this morning).

somewhereville avatar Oct 22 '23 19:10 somewhereville

Can confirm the issue as well. ALL my charts (created from table with id) fail with "There is no table at that id and/or file" after updating to 3.8.0 from 3.7.2.

I also get the popup "Table malformed". All charts have been working before the update.

countcb avatar Oct 23 '23 22:10 countcb

I experience the same issue since the last update

tomvankan avatar Oct 24 '23 17:10 tomvankan

@phibr0 Here's a full repro, using a table and chart taken from the docs:

Steps to reproduce Charts https://github.com/phibr0/obsidian-charts/issues/97

1 Set up the vault

  1. Open a new folder as a vault
  2. Install and enable the Charts plugin

2 Set up the file

  1. Create a new note
  2. Paste in the table and first Tasks block from the Chart from Table docs page
  3. Fix the block id in the chart so that it matches the table
|       | Test1 | Test2 | Test3 |
| ----- | ----- | ----- | ----- |
| Data1 | 1     | 2     | 3.33  |
| Data2 | 3     | 2     | 1     |
| Data3 | 6.7   | 4     | 2     |
^table


```chart
type: bar
id: table
layout: rows
width: 80%
beginAtZero: true
```
  1. View the page in Live Preview or Reading Mode

Expected result:

A chart displayed

Actual result:

image

There was no output in the Console.

claremacrae avatar Oct 26 '23 21:10 claremacrae

I'm experiencing the same issue as well, using Obsidian 1.4.16 and Charts 3.8.0

kepano avatar Oct 27 '23 20:10 kepano

Same problem. With Obsidian previous to 1.4.16 there was perfect.

robertohernando avatar Oct 30 '23 08:10 robertohernando

Workaround

For those on Desktop computers, the workaround for this is to revert the Charts plugin from 3.8.0 to 3.7.2:

  1. Click this button in settings to open the plugins folder in your vault:

image

  1. Open the obsidian-charts folder
  2. Download the 3.7.2 release zip file
  3. Expand the zip
  4. Copy the 3 expanded files in to the obsidian-charts folder, overwriting the 3.8.0 files.
  5. Restart Obsidian

Prevention

@kepano @phibr0 May I suggest that 3.8.0 is marked in the community plugins store as not to download, since it is effectively useless.

claremacrae avatar Oct 30 '23 11:10 claremacrae

.... since it is effectively useless

Well, at least for those creating charts from tables.

claremacrae avatar Oct 30 '23 12:10 claremacrae

Should be fixed in 3.8.2. Sorry for the delay.

I am honestly unsure about what caused this as it works without issues when I manually build it locally, must be something in the CI Pipeline. The latest release was published manually by me

phibr0 avatar Oct 30 '23 13:10 phibr0

Thanks for the fix! :)

countcb avatar Oct 30 '23 14:10 countcb

Reading view does work, but generating an image doesn't. Might this be related? Generating images without table id references does work fine 👍

BoboTheBarbar avatar Nov 06 '23 14:11 BoboTheBarbar

Reading view does work, but generating an image doesn't. Might this be related? Generating images without table id references does work fine 👍

In general, once a bug is closed as fixed, there's more chance of getting something different, even if related, fixed by logging a new issue. By all means include a link to this one...

And do add a detailed list of steps to reproduce it - like here: https://github.com/phibr0/obsidian-charts/issues/97#issuecomment-1781897920

All of these increase the chance of a friendly volunteer passer-by deciding to spend their time to help you out.

claremacrae avatar Nov 07 '23 18:11 claremacrae