Package ChartDirector

Examples of ChartDirector.Mark


            //

            // Add a red mark line to the chart, with the mark label shown at the left of
            // the mark line.
            double thresholdValue = Double.parseDouble(alarmThreshold.getText());
            Mark m = c.yAxis().addMark(thresholdValue, 0xff0000, "Alarm = " + thresholdValue);
            m.setAlignment(Chart.Left);
            m.setBackground(0xffcccc);

            if ((dataSeriesC[dataSeriesC.length - 1] > thresholdValue)
                    || (dataSeriesB[dataSeriesB.length - 1] > thresholdValue)) {
                // Add an alarm message as a custom text box on top-right corner of the
                // plot area if the latest data value exceeds threshold.
                c.addText(575, 62, "Alarm - Latest Value Exceeded Threshold",
                        "Arial Bold Italic", 10, 0xffffff, Chart.TopRight).setBackground(0xdd0000);
            }

            // Fill the region above the threshold as semi-transparent red (80ff8888)
            c.addInterLineLayer(layer.getLine(1), m.getLine(), 0x80ff8888, Chart.Transparent);
            c.addInterLineLayer(layer.getLine(2), m.getLine(), 0x80ff8888, Chart.Transparent);
        }

        // Set the chart image to the ChartViewer
        chartViewer1.setChart(c);
    }
View Full Code Here


            //

            // Add a red mark line to the chart, with the mark label shown at the left of
            // the mark line.
            double thresholdValue = Double.parseDouble(alarmThreshold.getText());
            Mark m = c.yAxis().addMark(thresholdValue, 0xff0000, "Alarm = " + thresholdValue);
            m.setAlignment(Chart.Left);
            m.setBackground(0xffcccc);

            if ((dataSeriesC[dataSeriesC.length - 1] > thresholdValue)
                    || (dataSeriesB[dataSeriesB.length - 1] > thresholdValue)) {
                // Add an alarm message as a custom text box on top-right corner of the
                // plot area if the latest data value exceeds threshold.
                c.addText(575, 62, "Alarm - Latest Value Exceeded Threshold",
                        "Arial Bold Italic", 10, 0xffffff, Chart.TopRight).setBackground(0xdd0000);
            }

            // Fill the region above the threshold as semi-transparent red (80ff8888)
            c.addInterLineLayer(layer.getLine(1), m.getLine(), 0x80ff8888, Chart.Transparent);
            c.addInterLineLayer(layer.getLine(2), m.getLine(), 0x80ff8888, Chart.Transparent);
        }

        // Set the chart image to the ChartViewer
        chartViewer1.setChart(c);
    }
View Full Code Here

            //

            // Add a red mark line to the chart, with the mark label shown at the left of
            // the mark line.
            double thresholdValue = Double.parseDouble(alarmThreshold.getText());
            Mark m = c.yAxis().addMark(thresholdValue, 0xff0000, "Alarm = " + thresholdValue);
            m.setAlignment(Chart.Left);
            m.setBackground(0xffcccc);

            if ((dataSeriesC[dataSeriesC.length - 1] > thresholdValue)
                    || (dataSeriesB[dataSeriesB.length - 1] > thresholdValue)) {
                // Add an alarm message as a custom text box on top-right corner of the
                // plot area if the latest data value exceeds threshold.
                c.addText(575, 62, "Alarm - Latest Value Exceeded Threshold",
                        "Arial Bold Italic", 10, 0xffffff, Chart.TopRight).setBackground(0xdd0000);
            }

            // Fill the region above the threshold as semi-transparent red (80ff8888)
            c.addInterLineLayer(layer.getLine(1), m.getLine(), 0x80ff8888, Chart.Transparent);
            c.addInterLineLayer(layer.getLine(2), m.getLine(), 0x80ff8888, Chart.Transparent);
        }

        // Set the chart image to the ChartViewer
        chartViewer1.setChart(c);
    }
View Full Code Here

TOP

Related Classes of ChartDirector.Mark

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.