apexcharts error

1,019 views
Skip to first unread message

Thomas

unread,
Dec 13, 2021, 8:41:04 AM12/13/21
to Cloud Carbon Footprint
I run now ccf locally against a GCP project ("Higher Accuracy" apporach).

In the frontend I get an error:

Uncaught (in promise) TypeError: s[t] is not a function
    zt/s[r[n]]</< apexcharts.common.js:6
    parse apexcharts.common.js:6
    Array apexcharts.common.js:6
    PathArray apexcharts.common.js:6
    plot apexcharts.common.js:6
    value apexcharts.common.js:6
    value apexcharts.common.js:6
    value apexcharts.common.js:6
    value apexcharts.common.js:6
    value apexcharts.common.js:6
    value apexcharts.common.js:6
    value apexcharts.common.js:14
    value apexcharts.common.js:6
    value apexcharts.common.js:14
    value apexcharts.common.js:14
    value apexcharts.common.js:6
    value apexcharts.common.js:14
    value apexcharts.common.js:14
    ApexLineChart ApexLineChart.tsx:84
    React 5
    unstable_runWithPriority scheduler.development.js:468

ApexLineChart.tsx:84 looks like...
    
  useEffect(() => {
    ApexCharts.exec('lineChart', 'updateSeries', [
      { ...

So probably data are now received but cannot displayed...

From my yarn.lock --> 

apexcharts: ^3.26.3

Any advice is welcome.

Thomas

Thomas

unread,
Dec 13, 2021, 10:46:42 AM12/13/21
to Cloud Carbon Footprint
Problem seems this line with seriesKey=CO2e 

ApexCharts.exec('lineChart', 'showSeries', [seriesKey])

However the
toggledSeries.forEach( ... loop 
runs successful for 
first       ... [["CO2e",true]]
second ... [["Kilowatt Hours",false]]
third     ...  [["Cost",false]]

BUT THEN 
PROBLEM !!! fourth...   [["CO2e",true]] 

Because it seems the same call as the first one I'm a bit lost for the moment....

Thomas

Dan Lewis-Toakley

unread,
Dec 14, 2021, 2:55:14 PM12/14/21
to Thomas, Cloud Carbon Footprint
Hi Thomas, 

Thanks for reaching out about the issues you're having. I'm wondering if it might be faster for us to jump on a quick call and maybe screen share to help resolve your problem(s)? I'm also keen to understand your use case a bit better, if possible, so we can best support you :)  

If that is okay with you, then let us know which timezone you are in, and I can suggest some available times.  

Best,
Dan

--
We're excited to hear from you and hope you're enjoying Cloud Carbon Footprint.
Please fill out our feedback form: https://forms.gle/nFzkRioryy4R1DGB6
Add your name to ADOPTERS.md: https://github.com/cloud-carbon-footprint/cloud-carbon-footprint/blob/trunk/ADOPTERS.md
Give us a star on the github if you're enjoying the tool!
---
You received this message because you are subscribed to the Google Groups "Cloud Carbon Footprint" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cloud-carbon-foot...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cloud-carbon-footprint/9c5bb9bd-3e0d-4304-b225-bf21799410b8n%40googlegroups.com.


--
Dan Lewis-Toakley
Green Cloud Lead, North America
Pronouns He/Him
Email dan.lewi...@thoughtworks.com
Telephone +19172545068
ThoughtWorks

Thomas

unread,
Dec 15, 2021, 2:58:31 AM12/15/21
to Cloud Carbon Footprint
Timezone Berlin! 6 hours between us. May be we can make a call when night falls here in central-europe...
(I'm not at my computer keyboard reliably during the day.)
We could use MS-teams.
(Email to [thomas AT randspringer DOT de] for appointment?!)
Thx
Thomas

Dan Lewis-Toakley

unread,
Dec 17, 2021, 1:24:36 PM12/17/21
to Thomas, Cloud Carbon Footprint
Hi Thomas, 

I think I found the issues here, and there were two fixes that I think should get things working for you, which you can see in this commit.

Could you pull the latest from the trunk branch, delete your packages/api/estimates.cache.day.json file, and try to run the application again? Let us know how it goes! 

Best,
Dan

Reply all
Reply to author
Forward
0 new messages