Skip to content

Drawing a vertical line chart #568

Not planned
Not planned

Description

@sterkhedkar

How do I implement a vertical line chart with working tooltips? please check the design

Screenshot 2020-10-12 at 2 36 43 PM

Activity

  1. Arantiryo commented on May 4, 2022

    @Arantiryo
    Collaborator

    Hi @sterkhedkar 👋

    Sorry for a late reply. You can create a vertical line chart by using Line component and setting options property indexAxis to 'y'.

    To permanently display data labels I suggest using chartjs-plugin-datalabels. Although it might be tricky to display them in a single column like on the suggested design. Here's a code sandbox to try out different styling options.

    Hope that helps!

  2. dangreen commented on Nov 30, 2026

    @dangreen
    Collaborator

    Closing: this is about how Chart.js itself behaves or is configured, while react-chartjs-2 passes data, options and plugins to Chart.js as they are. The Chart.js docs cover it: https://www.chartjs.org/docs/latest/ If it turns out to be a bug, please report it to Chart.js: https://github.com/chartjs/Chart.js/issues

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions