Пример #1
0
 private void vCreateLinGr()
 {
     //Создаем массив значений для вывода на графике
     vCreateRg();
     //Создаем класс и передаем ему размер холсты
     PaintCl clPaint = new PaintCl(pictureBox1.Width, pictureBox1.Height);
     //Фон холста
     clPaint.vSetBackground(Color.White);
     //Параметры вызоыва: отступы слева, справа, сверху(снизу),Цвет осей, толщина пера
     clPaint.vDravAxis(50, 50, 30, Color.Red, 2, true);
     clPaint.vSetPenWidthLine(1);
     clPaint.vSetPenColorLine(Color.Silver);
     clPaint.MaxRg = 20;
     clPaint.vDravGrid();
     clPaint.vSetPenWidthLine(2);
     clPaint.vSetPenColorLine(Color.Green);
     clPaint.RgValue = rgsValues;
     clPaint.vDrawGraphLines();
     Font objFont = new Font("Arial", 7, FontStyle.Bold | FontStyle.Italic);
     clPaint.font = objFont;
     clPaint.brush = Brushes.Blue;
     //Здесь необходимо поэксперементировать с
     //использованием различных надписей и изменением параметров
     clPaint.vDrawTextAxXNumber(false);
     //clPaint.vDrawTextAxXValues(true);
     clPaint.vDrawTextAxYValues();
     clPaint.vDrawTextAxYValuesPoint(true, false);
     //Принимаем нарисованное в pictureBox
     pictureBox1.Image = clPaint.Bmp;
 }
Пример #2
0
 private void vCreateCircleDiagramm()
 {
     //Создаем массив значений для вывода на графике
     vCreateRg();
     //Создаем класс и передаем ему размер холсты
     PaintCl clPaint = new PaintCl(pictureBox1.Width, pictureBox1.Height);
     //Фон холста
     clPaint.vSetBackground(Color.White);
     //Передаем значения массива в класс
     clPaint.RgValue = rgsValues;
     //Рисуем график. Параметры: отступ осей x слева, x справа ,
     //y от краев холста, толщина диаграммы,вынос сектора
     clPaint.vDravCircle3D(20, 250, 50, 20, 20, 40);
     //Круговые надписи true цифры 1-20, false - значения
     clPaint.vDravTextCircle1(true);
     //false - Разноцветные надписи в легенде true - Цветом шрифта
     clPaint.vDravTextKeyCircle(true);
     //Принимаем нарисованное в pictureBox
     pictureBox1.Image = clPaint.Bmp;
 }
Пример #3
0
 private void vCreateRectangleDiagramm()
 {
     //Создаем массив значений для вывода на графике
     vCreateRg();
     //Создаем класс и передаем ему размер холсты
     PaintCl clPaint = new PaintCl(pictureBox1.Width, pictureBox1.Height);
     //Фон холста
     clPaint.vSetBackground(Color.White);
     //Параметры вызоыва: отступы слева, справа, сверху(снизу),Цвет осей, толщина пера
     clPaint.vDravAxis(50, 50, 30, Color.Red, 2, true);
     clPaint.vSetPenWidthLine(1);
     clPaint.vSetPenColorLine(Color.Silver);
     clPaint.MaxRg = 20;
     clPaint.vDravGrid();
     clPaint.vSetPenWidthLine(2);
     clPaint.vSetPenColorLine(Color.Green);
     clPaint.RgValue = rgsValues;
     //a=0 без сдвига цвета a=1 со сдвигом,b = 0 - без разрыва, > 1 - с разрывом и величина разрыва в %
     clPaint.vDrawGraphRectangular(1, 5);
     Font objFont = new Font("Arial", 7, FontStyle.Bold | FontStyle.Italic);
     clPaint.font = objFont;
     clPaint.brush = Brushes.Blue;
     clPaint.vDrawTextAxXNumber(false);
     //clPaint.vDrawTextAxXValues(true);
     clPaint.vDrawTextAxYValues();
     clPaint.vDrawTextAxYValuesPoint(true, false);
     //Принимаем нарисованное в pictureBox
     pictureBox1.Image = clPaint.Bmp;
 }