Skip to content

Allow to set an array of x-ticks placements manually on 2D charts #1590

@Atokulus

Description

@Atokulus

Hi there
Many thanks for your great work on this project. I am currently dealing with realtime charts and encountered some minor flaws (one of them shown here).

One of the challenges is to have exact datetime ticks on the x-axis to follow streaming data. On the x-axis type datetime the ticks do not follow for minutes and seconds, which seems to be a bug on its own, and it might be impossible to control the granularity and placement.

To make Apexcharts the most versatile and accessible as possible, we should be allowed to set an array of x-ticks placements manually, such as

let xaxis = {
    tickAmount: undefined,
    tickPlacement: [1588838802, 1588839802, 1588840802, ... ]
    labels: {
        formatter: (value, timestamp) => {
            return new Date(timestamp).toLocaleTimeString()
        }
    },
}

This allows for more complex setups, at minimal added complexity to the library.

What is your opinion on this?

Best regards
Markus Wegmann, Technokrat GmbH

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions