public static void WritePlayerTabDPSGraph(StreamWriter sw, string name, List <Point> playerdpsgraphdata, AbstractPlayer p) { int ptdgCount = 0; bool total = name.Contains("Total"); bool cleave = name.Contains("Cleave"); bool s10 = name.Contains("10s"); bool s30 = name.Contains("30s"); sw.Write("y: ["); { foreach (Point dp in playerdpsgraphdata) { if (ptdgCount == playerdpsgraphdata.Count - 1) { sw.Write("'" + dp.Y + "'"); } else { sw.Write("'" + dp.Y + "',"); } ptdgCount++; } if (playerdpsgraphdata.Count == 0) { sw.Write("'0'"); } } sw.Write("],"); //add time axis sw.Write("x: ["); { ptdgCount = 0; foreach (Point dp in playerdpsgraphdata) { if (ptdgCount == playerdpsgraphdata.Count - 1) { sw.Write("'" + dp.X + "'"); } else { sw.Write("'" + dp.X + "',"); } ptdgCount++; } if (playerdpsgraphdata.Count == 0) { sw.Write("'0'"); } } sw.Write("],"); string color = GeneralHelper.GetLink("Color-" + p.Prof + (total? "-Total" : (cleave? "-NonBoss": ""))); sw.Write(" mode: 'lines'," + "line: {shape: 'spline',color:'" + color + "'}," + "yaxis: 'y3',"); if (s10 || s30) { sw.Write(" visible: 'legendonly',"); } // "legendgroup: 'Damage'," + sw.Write("name: '" + name + "'," + "legendgroup: '" + p.Character + (s10 ? "10s" : (s30 ? "30s" : "")) + "'"); }