timqian / chart.xkcd

xkcd styled chart lib
https://timqian.com/chart.xkcd/
MIT License
7.61k stars 200 forks source link

Override `stroke-dasharray` attribute in XY chart if option has `dataLineDashes` #24

Open d3m3vilurr opened 4 years ago

d3m3vilurr commented 4 years ago

this pr is just proposal. I need this option for personal reason. similar option in line & xy charts would help to make the chart

timqian commented 4 years ago

Hi @d3m3vilurr I am happy to add this option as long as the graph looks OK when dashed. Do you have an example showing how it looks?

I will keep this PR open for a while to see if others like this option

d3m3vilurr commented 4 years ago

firefox_2019-09-04_21-27-35

here is the my sample. I want to draw burndown chart using this lib.

options is

{
  xTickCount: 5,
  yTickCount: 5,
  showLine: true,
  legendPosition: chartXkcd.config.positionType.upRight,
  timeFormat: 'MM/DD',
  dataColors: ['lightgray', '#dd4528', '#28a3dd', '#f3db52'],
  dataLineDashes: ['5 5'],
  dotSize: 0.3,
}