/// <summary> /// Initializes a new instance of the <see cref="T:ActivityLegend"/> class. /// </summary> /// <param name="mainChart">The chart.</param> public ActivityLegend(Chart mainChart) { // Set up the event handler for chart SetUpEventHandler(mainChart); // Store the current chart in the private variable myChart = mainChart; // Reset the seriesCount seriesCount = 0; // Set line thickness to 1 by default myLineThickness = 1; // Set the point radius to 5 by default myCirclePointRadius = 5; // Default the circle outline thickness to 2 myCircleOutlineThickness = 2; // Default the outline of the circle to silver myCircleOutlineColor = Color.Silver; // Set the default format string to a short date myLegendDateFormat = "Y"; // Set the default fonts used for the cells myFirstCellFont = new System.Drawing.Font("Arial", 8, System.Drawing.FontStyle.Bold); mySecondCellFont = new System.Drawing.Font("Arial", 8); // Set the legend to some default properties myLegend = new Legend("ActivityLegend00"); myLegend.Docking = Docking.Left; // Instatiate the AlternateLineColors class myAlternateLineColors = new AlternateLineColorsClass(); }