Kyvis-Labs / ignition-apexcharts-module

The module provides Perspective ApexCharts components
Apache License 2.0
59 stars 12 forks source link

Problem with version higher than 1.00 #22

Closed Aiasa21 closed 1 year ago

Aiasa21 commented 2 years ago

Good morning, I realized that I was using module version 1.00 so I updated to 1.09. When I did this the charts stop working (area and line chart with tag history binding) showing no data (the label values was NaN).

So I downgrade to 1.08, to 1.07 and in both cases they didn’t work, when I downgrade to 1.06 they start to work again in preview mode in perspective, but not neither the APP nor the browser show data in the chart.

In the end I downgrade to 1.00 and everything works properly

traviscox commented 2 years ago

Can you provide me a backup of your chart that didn't work in 1.0.9?

Aiasa21 commented 2 years ago

Good evening, actually I figure out the problem with the guys in the inductive automation forum. In 1.00 the chart shows the data just binding the history tag, but in the other versions I have to add a script trasformation like this:

return [[row['t_stamp'], row['tag_name']] for row in value]

doing this the chart works properly.

I actually have a couple of "problem" that I can't find a solution and I take this opportunity to ask your help about them.

  1. How is possible to show only 2 data labels in a line/area chart (min and max) or however decide how many data labels show. In some chart I have 40 points and when the data labels is shown then is impossible to read the chart.
  2. Always in ignition perspective I have views with the chart in a flex container, when I open the view the Chart doesn’t grow as the flex container but I have to refresh it (changing for example the X axis range) so to grow it as the container.

The Apex Chart is in a flex container and when I open the page here is what I see: Annotation 2022-09-09 203941

Once I update the chart changing any property, it’s shown correctly: Annotation 2022-09-09 204002

Now I "fixed" this problem in this way: when I open the page I change the YtickAmount and after 1 second I set the YtickAmount at the original value. This is a solution that I would like to avoid because I see the chart refresh twice in one second.

Thanks for the help.

traviscox commented 2 years ago

For the data labels, you have to use a formatter to customize which ones are shown. Something like this:

function(value, { seriesIndex, dataPointIndex, w }) { if(dataPointIndex == 0){ return w.config.series[seriesIndex].name + ": " + value; } else { return ""; } }

For the second question, wrapping it in a Flex container should fix the problem. Can you send me a backup of the Perspective view?

Aiasa21 commented 2 years ago

Thanks for the explanation about the labels, I'll try to use it in the way you suggest.

About the second question, it is already into a flex container. How can I send the view privately?

traviscox commented 1 year ago

Fixed the resizing issue in 1.0.10: Can you download and try it out:

https://github.com/Kyvis-Labs/ignition-apexcharts-module/releases/tag/1.0.10

traviscox commented 1 year ago

Had to fix another small issue, now at 1.0.11:

https://github.com/Kyvis-Labs/ignition-apexcharts-module/releases/tag/1.0.11

traviscox commented 1 year ago

Ok, I think we have finally figured out the root of the problem. Fixed in 1.0.13:

https://github.com/Kyvis-Labs/ignition-apexcharts-module/releases/tag/1.0.13

Aiasa21 commented 1 year ago

Thanks for the reply and for fixing the problems.

I'll try as soon as I can.

Have a nice day.

On Thu, Feb 2, 2023, 18:00 Travis Cox @.***> wrote:

Ok, I think we have finally figured out the root of the problem. Fixed in 1.0.13:

https://github.com/Kyvis-Labs/ignition-apexcharts-module/releases/tag/1.0.13

— Reply to this email directly, view it on GitHub https://github.com/Kyvis-Labs/ignition-apexcharts-module/issues/22#issuecomment-1414068203, or unsubscribe https://github.com/notifications/unsubscribe-auth/A2JLIKLBFRUEIWOJ2SCD3NLWVPR3FANCNFSM55CW4LZA . You are receiving this because you authored the thread.Message ID: @.***>

traviscox commented 1 year ago

Closing due to inactivity.