# KyvisLabs ApexChart Module

**URL:** <https://forum.inductiveautomation.com/t/kyvislabs-apexchart-module/55263>\
**Category:** Ignition\
**Created:** [July 21, 2021, 11:16pm UTC](https://forum.inductiveautomation.com/t/kyvislabs-apexchart-module/55263 "2021-07-21T23:16:30Z")\
**Posts on this page:** 20\
**Page:** 7

<div class="post-metadata">

**Author:** ![hw79](https://avatars.discourse-cdn.com/v4/letter/h/838e76/32.png) [@hw79](https://forum.inductiveautomation.com/u/hw79)\
**Post date:** [November 14, 2023, 7:44pm UTC](https://forum.inductiveautomation.com/t/kyvislabs-apexchart-module/55263/125 "2023-11-14T19:44:25Z")

</div>

My heatmap isn't shading differently between values. I have the plotOptions.heatmap.colorScale.ranges.0 from 0.9 to 1.0. I also tried setting the plotOptions.heatmap.colorScale.min and .max and still not getting any shading.

Any advice?

I wrote a script to take the two colors and make a number of interpolated gradients between them. I bound this to options.plotOptins.heatmap.colorScale.ranges

```auto
def transform(self, value, quality, timestamp):
    import json

    my_dataset = value
    
    # Assuming 'my_dataset' is your Ignition dataset
    test_index = my_dataset.getColumnIndex('TestValues')

    # Extract data from the 'TestValues' column
    test_values = [my_dataset.getValueAt(row, test_index) for row in range(my_dataset.getRowCount())]

    # Calculate min and max values of 'TestValues'
    min_value = min(test_values)
    max_value = max(test_values)

    # Calculate the range between min and max divided into 10 equal parts
    value_range = max_value - min_value
    step_size = value_range / 9 # Adjusted to 9 steps for correct interpolation

    # Generate the density ranges with interpolated colors and names
    value_ranges = [
        {
            "from": min_value + i * step_size,
            "to": min_value + (i + 1) * step_size,
            "color": interpolate_color("#DCF0FE", "#008BFA", (i + 0.5) / 10), 
            "name": "Relative Values {}".format(i + 1),
            "foreColor": "#000000"
        }
        for i in range(25) # Adjust gradient steps
    ]

    # Convert to JSON format
    json_value_ranges = json.dumps(value_ranges)

    return value_ranges
import colorsys

def interpolate_color(color1, color2, factor):
    """Interpolate between two colors."""
    r1, g1, b1 = int(color1[1:3], 16), int(color1[3:5], 16), int(color1[5:7], 16)
    r2, g2, b2 = int(color2[1:3], 16), int(color2[3:5], 16), int(color2[5:7], 16)

    r, g, b = [int(c1 + (c2 - c1) * factor) for c1, c2 in zip((r1, g1, b1), (r2, g2, b2))]

    interpolated_color = "#{:02X}{:02X}{:02X}".format(r, g, b)

    return interpolated_color

```

---

<div class="post-metadata">

**Author:** ![nader.chinichian](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nader.chinichian/32/9261_2.png) [@nader.chinichian](https://forum.inductiveautomation.com/u/nader.chinichian)\
**Post date:** [February 6, 2024, 8:24am UTC](https://forum.inductiveautomation.com/t/kyvislabs-apexchart-module/55263/126 "2024-02-06T08:24:10Z")

</div>

Does anyone know how to hide the top empty area of Apexchart?

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/f/e/fe801ed3be585b64a5ae7d986215e0d8dfb15781.png)

---

<div class="post-metadata">

**Author:** ![riccardo.giampaolo](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/riccardo.giampaolo/32/20852_2.png) [@riccardo.giampaolo](https://forum.inductiveautomation.com/u/riccardo.giampaolo)\
**Post date:** [February 8, 2024, 1:12pm UTC](https://forum.inductiveautomation.com/t/kyvislabs-apexchart-module/55263/127 "2024-02-08T13:12:11Z")

</div>

Hey all, I just want to report a very weird behavior we have encountered with the Apexcharts module (v 1.0.16). It seems like events are triggered even if the chart is not in focus or covered by other elements. I tested markerClick and Click events, and they both register even if the event originated from a dropdown covering the chart.

In the video, I put as a reference also an icon with a onClick event on it. The icon correctly doesn't catch the event generated when clicking on the dropdown, but the Apexchart does. I tested this also with other native perspective elements and events are correctly not propagated if the element is not the focus of the click.

This has been tested on 8.1.35, 8.1.36, both in Chrome and Firefox.

Anybody encountered this behavior and/or has workarounds?Thanks in advance

---

<div class="post-metadata">

**Author:** ![dhananjay\_vichare](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/dhananjay_vichare/32/74712_2.png) [@dhananjay\_vichare](https://forum.inductiveautomation.com/u/dhananjay_vichare)\
**Post date:** [February 13, 2024, 12:38pm UTC](https://forum.inductiveautomation.com/t/kyvislabs-apexchart-module/55263/128 "2024-02-13T12:38:08Z")

</div>

Hello all, I would like few events on Apex Chart. One is requested in the forum post please find below link.

> [@Apex Chat custom icon click event](https://forum.inductiveautomation.com/t/apex-chat-custom-icon-click-event/85427):
>
> I have added custom icon on Apex chart, I would like to open popup on click of the custom icon. Please help me on how I can perspective script or function to call popup. I have added custom icon using below.

Another I would like to have a X axis label click event (_xAxisLabelClick_). Using this I would like to navigate to particular view.

Please let me know the solution for both the requirements.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [February 13, 2024, 12:42pm UTC](https://forum.inductiveautomation.com/t/kyvislabs-apexchart-module/55263/129 "2024-02-13T12:42:18Z")

</div>

It is an open source project. You can fork it, implement the feature, and generate a pull request. Small projects expect the person who wants a feature to provide the feature.

---

<div class="post-metadata">

**Author:** ![dhananjay\_vichare](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/dhananjay_vichare/32/74712_2.png) [@dhananjay\_vichare](https://forum.inductiveautomation.com/u/dhananjay_vichare)\
**Post date:** [February 13, 2024, 12:46pm UTC](https://forum.inductiveautomation.com/t/kyvislabs-apexchart-module/55263/130 "2024-02-13T12:46:10Z")

</div>

> [@pturmel](#):
>
> It is an open-source project. You can fork it, implement the feature, and generate a pull request. Small projects expect the person who wants a feature to provide the feature.

Thank you, Phil Turmel, However I am not a Java programmer, hence need some help on this. I thought that Travis will help me on this.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [February 13, 2024, 12:51pm UTC](https://forum.inductiveautomation.com/t/kyvislabs-apexchart-module/55263/131 "2024-02-13T12:51:53Z")

</div>

Travis (or Kyle) might help. But you say you have a **requirement**. In the open source world, that means **you** have to either do the work, recruit additional help, or pay someone to do the work. (If you can find someone willing to do it for pay.)

---

<div class="post-metadata">

**Author:** ![Zach\_Larson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/zach_larson/32/54388_2.png) [@Zach\_Larson](https://forum.inductiveautomation.com/u/Zach_Larson)\
**Post date:** [February 13, 2024, 2:17pm UTC](https://forum.inductiveautomation.com/t/kyvislabs-apexchart-module/55263/132 "2024-02-13T14:17:30Z")

</div>

My favorite takeaway from that video is the arrow keys to change the day easily.

I don't understand it fully though. It looked like left arrow shifted the day back one.  
Looked like right arrow bumped both days out one either side of the range.

* * *

I still want to implement some good radar charts.

---

<div class="post-metadata">

**Author:** ![jcjc74836](https://avatars.discourse-cdn.com/v4/letter/j/439d5e/32.png) [@jcjc74836](https://forum.inductiveautomation.com/u/jcjc74836)\
**Post date:** [February 15, 2024, 3:12am UTC](https://forum.inductiveautomation.com/t/kyvislabs-apexchart-module/55263/133 "2024-02-15T03:12:57Z")

</div>

Is really nice the Apex chart.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/c/3/c3a93a200bd93a1521ae62d58b9895392554e342.jpeg)

---

<div class="post-metadata">

**Author:** ![Alex\_Russell](https://avatars.discourse-cdn.com/v4/letter/a/ed655f/32.png) [@Alex\_Russell](https://forum.inductiveautomation.com/u/Alex_Russell)\
**Post date:** [March 5, 2024, 8:56pm UTC](https://forum.inductiveautomation.com/t/kyvislabs-apexchart-module/55263/134 "2024-03-05T20:56:31Z")

</div>

How are you putting "formatter": "function {val}... " into the tree of the props window? I am trying to round my Total value to my radialBar chart - but when I try to add formatter as a value (like I have "show": true etc) it obviously isnt working. Is there some tool I am missing? Seems like everyone is attaching the JS but you have to manually add to tree in perspective in the correct Value/Object/Array form

---

<div class="post-metadata">

**Author:** ![jcjc74836](https://avatars.discourse-cdn.com/v4/letter/j/439d5e/32.png) [@jcjc74836](https://forum.inductiveautomation.com/u/jcjc74836)\
**Post date:** [March 7, 2024, 8:43pm UTC](https://forum.inductiveautomation.com/t/kyvislabs-apexchart-module/55263/135 "2024-03-07T20:43:47Z")

</div>

is depending, if you want to round in the tooltip you should use something like that in the formatter option function (value) { return value.toFixed(0);}

---

<div class="post-metadata">

**Author:** ![elijah.roberts](https://avatars.discourse-cdn.com/v4/letter/e/a6a055/32.png) [@elijah.roberts](https://forum.inductiveautomation.com/u/elijah.roberts)\
**Post date:** [March 21, 2024, 5:47pm UTC](https://forum.inductiveautomation.com/t/kyvislabs-apexchart-module/55263/136 "2024-03-21T17:47:57Z")

</div>

I have a general question about licensing. When adding the module to Ignition it shows a **NOT VALID AFTER 05/04/2026** during the installation. Does this mean before or on that date during an upgrade we will need to reinstall the module to update that certificate? If we don't will the charts we are running in projects just stop working? This may be a dumb question but I just wanted to make sure as we are considering using this module for projects. Thanks!

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [March 21, 2024, 6:56pm UTC](https://forum.inductiveautomation.com/t/kyvislabs-apexchart-module/55263/137 "2024-03-21T18:56:30Z")

</div>

Ignition ignores certificate dates. It shows them so you can decide, at the time of module install, if you care. The module will not stop working. (This isn't a licensed module, anyways. It's free.)

---

<div class="post-metadata">

**Author:** ![nader.chinichian](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nader.chinichian/32/9261_2.png) [@nader.chinichian](https://forum.inductiveautomation.com/u/nader.chinichian)\
**Post date:** [April 13, 2024, 2:44pm UTC](https://forum.inductiveautomation.com/t/kyvislabs-apexchart-module/55263/138 "2024-04-13T14:44:58Z")

</div>

In new Ignition 8.1.39, the Apexchart component doesn't render and get error:

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/d/5/d54058f71af33dd178ba06947e0359184977c018.png)

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [April 13, 2024, 2:52pm UTC](https://forum.inductiveautomation.com/t/kyvislabs-apexchart-module/55263/139 "2024-04-13T14:52:53Z")

</div>

You should make a github issue reporting this.

---

<div class="post-metadata">

**Author:** ![nader.chinichian](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nader.chinichian/32/9261_2.png) [@nader.chinichian](https://forum.inductiveautomation.com/u/nader.chinichian)\
**Post date:** [April 13, 2024, 2:58pm UTC](https://forum.inductiveautomation.com/t/kyvislabs-apexchart-module/55263/140 "2024-04-13T14:58:18Z")

</div>

I also did that, but may be someone here knows how to solve it.

---

<div class="post-metadata">

**Author:** ![jasongrant15](https://avatars.discourse-cdn.com/v4/letter/j/51bf81/32.png) [@jasongrant15](https://forum.inductiveautomation.com/u/jasongrant15)\
**Post date:** [April 16, 2024, 3:29pm UTC](https://forum.inductiveautomation.com/t/kyvislabs-apexchart-module/55263/141 "2024-04-16T15:29:19Z")

</div>

Has anyone experienced issues with apex charts within the perspective IOS application? When attempting to use a line chart, the chart renders but the line is missing. This behavior does not occur on ios safari, chrome, edge, firefox, android perspective etc. It's only within perspective ios.Running 8.1.37. This happens with custom built trends as well as simply dragging an apex chart onto a view and leaving all the default values.

Thanks!

 ![thumbnail_IMG_4484](https://us1.discourse-cdn.com/inductiveautomation/original/3X/2/6/26f43189feb037ed955caddb35daa7291543f357.png)

---

<div class="post-metadata">

**Author:** ![nader.chinichian](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nader.chinichian/32/9261_2.png) [@nader.chinichian](https://forum.inductiveautomation.com/u/nader.chinichian)\
**Post date:** [April 17, 2024, 5:08pm UTC](https://forum.inductiveautomation.com/t/kyvislabs-apexchart-module/55263/142 "2024-04-17T17:08:30Z")

</div>

Yes, I saw that issue. Please report it on GitHub as well.

---

<div class="post-metadata">

**Author:** ![msteele](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/msteele/32/77889_2.png) [@msteele](https://forum.inductiveautomation.com/u/msteele)\
**Post date:** [May 4, 2024, 3:58pm UTC](https://forum.inductiveautomation.com/t/kyvislabs-apexchart-module/55263/143 "2024-05-04T15:58:44Z")

</div>

Looks like this was fixed in v 1.0.17 of the ApexCharts module: [Releases · Kyvis-Labs/ignition-apexcharts-module · GitHub](https://github.com/Kyvis-Labs/ignition-apexcharts-module/releases)

---

<div class="post-metadata">

**Author:** ![Rutger\_Van\_Aelst](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/rutger_van_aelst/32/54459_2.png) [@Rutger\_Van\_Aelst](https://forum.inductiveautomation.com/u/Rutger_Van_Aelst)\
**Post date:** [May 9, 2024, 4:03pm UTC](https://forum.inductiveautomation.com/t/kyvislabs-apexchart-module/55263/145 "2024-05-09T16:03:24Z")

</div>

Solved it for me, thanks for posting!

[Previous page](https://forum.inductiveautomation.com/t/kyvislabs-apexchart-module/55263.md?page=6)

[Next page](https://forum.inductiveautomation.com/t/kyvislabs-apexchart-module/55263.md?page=8)
