KyvisLabs ApexChart Module

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

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

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


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

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

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.

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.

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

1 Like

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.

Is really nice the Apex chart.

1 Like