n3-charts / line-chart

Awesome charts for AngularJS.
http://n3-charts.github.io/line-chart/
MIT License
1.2k stars 180 forks source link

Dot Appearance & Shape #547

Open spliffie opened 7 years ago

spliffie commented 7 years ago

Hi there,

a small foreword first. From the values i fed my chart with, i'm calculating things like standard deviation, average and so on. I'm "drawing" these statistical quantities for the according interval i set (e.g. if the interval is set to month, there will be 12 horizontal lines representing 1 year, if interval set to weeks 52-53 lines will represent 1 year) Now i'm having 2 dots, 1 at the beginning and 1 at the end of each interval.

What i'd like to have What i'd like to be able to do is hiding the dots at the beginning and the end and insert 1 in the middle of the interval.

Also i'd like to be able to change the shape of these "special dots" i'm setting to like triangles or something like that.

I don't want an additional series.

How i tried to archieve this I was able to set a point in the middle by a bit hacky way. I insert a undefined value at the end of the main series and keep inserting value, undefined, value, undefined, value, .... This way im able to set an independent point at the exact location i want (in the middle of the line and not connected to other points) Here seems to be the problem to tell the chart when to show such a point when not. (cuz now i got 3 dots for each interval. 1 at the beginning, 1 in the middle and 1 at the end)

capture

Greetings :)