|
Does dashLineColor accept -1 as a colour? |
Posted by Brian C on Jun-24-2015 21:16 |
|
This, for example:
layer.addDataSet(Dataset.dataYData.ToArray(), c.dashLineColor(-1, Chart.DashLine), DateTime.Parse(Dataset.title).ToString("hh:mm tt"));
I am using the -1 because there is a number of datasets and I want to use auto colour.
Cannot see the dashed lines. |
Re: Does dashLineColor accept -1 as a colour? |
Posted by Peter Kwan on Jun-24-2015 23:04 |
|
Hi Brian,
Unluckily, no. Only the data set color itself can be -1. In your code, the data set color is
the dashLineColor, and so the data set color is not -1. The input to the dashLineColor also
cannot be -1.
For your case, may be you would need to keep track of the automatic colors with your own
code. The method is to keep a counter. Whenever you need a color, use the counter and
then increment it for the next color. It is like:
// The automatic data color
int myAutoColor = Chart.DataColor;
layer.addDataSet(myData, myAutoColor++, ....);
layer.addDataSet(anotherLine, c.dashLineColor(myAutoColor++, Chart.DashLine), ....);
Hope this can help.
Regards
Peter Kwan |
|