phibr0 / obsidian-charts

Charts - Obsidian Plugin | Create editable, interactive and animated Charts in Obsidian via Chart.js
https://charts.phib.ro/
GNU Affero General Public License v3.0
546 stars 25 forks source link

[Bug]: Fail to create chart from table #97

Open OxideCalcium opened 9 months ago

OxideCalcium commented 9 months ago

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

somewhereville commented 9 months ago

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).

countcb commented 9 months ago

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.

tomvankan commented 9 months ago

I experience the same issue since the last update

claremacrae commented 9 months ago

@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.

kepano commented 9 months ago

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

robertohernando commented 9 months ago

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

claremacrae commented 9 months ago

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 commented 9 months ago

.... since it is effectively useless

Well, at least for those creating charts from tables.

phibr0 commented 9 months ago

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

countcb commented 9 months ago

Thanks for the fix! :)

BoboTheBarbar commented 8 months ago

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

claremacrae commented 8 months ago

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.