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

[Bug]: bestFit doesn't consider data loaded from table #123

Open
nhomble opened this issue Jun 2, 2024 · 1 comment
Open

[Bug]: bestFit doesn't consider data loaded from table #123

nhomble opened this issue Jun 2, 2024 · 1 comment

Comments

@nhomble
Copy link

nhomble commented Jun 2, 2024

Describe the bug

There is a exception when I try to add a trend line in a chart block that sources the series from a table.

Seems like sourcing from the table isn't happening in time when the bestFit condition is hit.

Relevant errors (if available)

https://github.com/phibr0/obsidian-charts/blob/master/src/main.ts#L47
`series` is `undefined`

Steps to reproduce

x y
1 1
2 4
3 9
4 16
^repro
type: line
id: repro
layout: columns
tension: 0.2
width: 80%
labelColors: false
fill: false
beginAtZero: false
bestFit: true
bestFitNumber: 1

Expected Behavior

The best fit line should work for table sources just like inline series.

Additional context

No response

Code

No response

Operating system

Windows

@JuanDArdilaG
Copy link

I'm receiving this error when using best fit option with a chart from a table:
plugin:obsidian-charts:80 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading '0') at Ol.postprocessor (plugin:obsidian-charts:80:1389)

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

2 participants