ASE Home Page Products Download Purchase Support About ASE
ChartDirector Support
Forum HomeForum Home   SearchSearch

Message ListMessage List     Post MessagePost Message

  Dataset Dashline Autocolor?
Posted by Mark on Aug-28-2019 02:18
c#


switch (field)
                            {
                                case "1":
                                    linetype = Chart.DashLine;
                                    lineColor = 0x009900;
                                    break;
                                case "2":
                                    linetype = Chart.DotDashLine;
                                    lineColor = 0x009999;
                                    break;
                                case "3":
                                    linetype = Chart.DotLine;
                                    lineColor = 0x999900;
                                    break;
                                case "4":
                                    linetype = Chart.AltDashLine;
                                    lineColor = 0x990099;
                                    break;

                                default:
                                    linetype = Chart.DotLine;
                                    lineColor = 0x009900;
                                    break;
                            }

layer.addDataSet(str, c.dashLineColor(lineColor, linetype), label4.ToUpper()).setDataSymbol(i + 2, 7);


is there a way, for the linecolor to be Auto colored similar to
layer.addDataSet(str, -1, label4.ToUpper()).setDataSymbol(i + 2, 7);

  Re: Dataset Dashline Autocolor?
Posted by Peter Kwan on Aug-28-2019 23:51
Hi Mark,

Try:

layer.addDataSet(str, -1, label4.ToUpper()).setDataSymbol(Chart.DataColor + i, 7);

If you want the symbol color to be consistent with the auto-line color, you may use the same color for both:

layer.addDataSet(str, Chart.DataColor + i, label4.ToUpper()).setDataSymbol(Chart.DataColor + i, 7);

Hope this can help.

Regards
Peter Kwan