Skip to content

xaxis last label is trimmed #305

@Epithumia

Description

@Epithumia

Codepen

Showcase codepen

Explanation

The showcase codepen uses the current versions of Vue-ApexCharts and ApexCharts.js, the expected behavior uses v1.1.0

  • What is the behavior you expect?

Correct result codepen

The x axis sets the first and last point to be at the edge of the grid in the current version of Vue-ApexCharts, whereas the version showcased in the demos (that's where I picked the initial code) correctly sets the labels and the datapoints to have enough offset on both sides so that no clipping occurs.

  • What is happening instead?

Edge points and labels are clipped.

  • What error message are you getting?

None.

Edit: Let me know if I should submit this to the Vue-ApexCharts repo instead.

Edit2: after fiddling with codepen, I can say this is an apexcharts issue, not the Vue component. This codepen uses apexcharts v3.1.0 and displays fine. It breaks starting with 3.2.0.

Edit3: I found that a property was added in 3.2.0 (xaxis.tickPlacement), which defaults to 'on', whereas the old behavior for a line chart was to have it as 'between'. The documentation isn't reflecting this, nor does it mention the existence of xaxis.tickPlacement. May I suggest that:

  1. Default for line should be set to 'between'
  2. Documentation should be updated ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions