Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐞 lineCap has no effect #49

Closed
apertureless opened this issue Aug 23, 2018 · 4 comments
Closed

🐞 lineCap has no effect #49

apertureless opened this issue Aug 23, 2018 · 4 comments
Labels
bug Something isn't working

Comments

@apertureless
Copy link

Hey there!

I've tried to create a line-chart with the vue-apexcharts.
However I guess the issue is related to the core.

It seems that the stroke.lineCap option has no effect.
According to the docs the lineCap should have three options: butt, square and round however neither of those is changing the line chart. I am aiming for the round option but the ends of the stroke are not rounded at all.

Changing the option to butt or square also seems to have no effect.

bildschirmfoto 2018-08-23 um 15 43 27

Example

<template>
  <chart
    :options="options"
    :series="series"
    type="line"
    width="550"
  />
</template>

<script>
import VueApexCharts from 'vue-apexcharts'

export default {
  name: 'LineChart',
  components: {
    chart: VueApexCharts
  },
  props: {
    colors: {
      type: Array,
      default: () => (['#0064AD', '#00925B'])
    }
  },
  data: () => ({
    options: {
      chart: {
        id: 'line-chart',
        toolbar: {
          show: false
        }
      },
      stroke: {
        show: true,
        curve: 'smooth',
        lineCap: 'round',
        width: 4
      },
      colors: [],
      xaxis: {
        categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep']
      },
      yaxis: {
        min: 0
      },
      markers: {
        size: 0
      }
    },
    series: [{
      name: 'Anzahl Arten',
      data: [20, 50, 10, 80, 100]
    }, {
      name: 'Anzahl Nachweise',
      data: [10, 10, 5, 40, 20]
    }]

  }),
  created () {
    this.options.colors = this.colors
  }
}
</script>
@junedchhipa
Copy link
Contributor

Hey Jakub,
I confirm this doesn't work as expected. Had a quick look at the code, and I have hard-coded "butt" option in the drawPath method.

Thanks for reporting, will be fixed soon

@junedchhipa junedchhipa added the bug Something isn't working label Aug 23, 2018
@junedchhipa
Copy link
Contributor

Fixed in a10dbf6

@apertureless
Copy link
Author

Awesome, thanks! 🙏

@vsb-marcus
Copy link

@junedchhipa the same is happening for angular-apexcharts but in radialbar chart

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants