Label chart (2d columns) vertical

Hi,
I created a 2d column chart. The label on the X ax is standard horizontal. Is there a way to display it vertical?
Rgrds, Robbert

Hi,
On a Flash Chart, you have the option on the Chart Attributes page, to enter in a Labels Rotation value. If you enter either 90 or 270 into this setting, the labels will be rendered vertically.
Andy

Similar Messages

  • Print Report to PDF with columns vertical instead of horizontal

    I enabled report printing for a report region but the PDF lists the columns horizontally even though the columns are listed vertically on the report page. Is there a way to list the columns vertically on the PDF so that it matches the layout on the report page. Thanks for your help.

    Hi hhsu68
    Wondering how you are arranging columns listed vertically on the report page?
    You mean just selecting any vertical report template, or
    you mean just column headers are vertical and the data as normal (horizontal)?
    If its the second case could you please let me know how you did that?
    Off course I would also like to know if you have found a solution to your problem as well.
    Thank you
    Ligon

  • Common Label for two columns in pivot view??

    Hi Guys,
    PLs help me..
    i want common label or heading columns in pivot view..
    Example:
    Under label1 (i should have two columns like 'A','B'), under label2(shud have colums like 'C','D','E')..
    i tried with dummy column, i placed it in measures section..but its not worked)..

    Hi Bhargav,
    f you are using 11g, goto Pivot Table Properties->Display Column & Folder Headings option.
    In 10g try this, http://obiee1000.blogspot.in/2012/03/header-on-measures.html
    Regards,
    Dpka

  • Business Graphics - Chart Type - Columns, and Simple Scatter Type

    Hi,
        I am interested to know more about Business Graphics Specially Chart types Columns and
    Scatter type ( and Time Scatter).  I am facing problem in producing X and Y Co-ordinate values for Charts. (Specially Date Values in X Axis.). I tried with Time Scatter type and need more documents.
    Expecting Good Documents and suggestions.
    Thanks, 
             Vinod V

    Hi
    Check this link
    http://help.sap.com/saphelp_nwmobile71/helpdata/en/86/243f403f0a9354e10000000a155106/frameset.htm
    http://help.sap.com/saphelp_nwmobile71/helpdata/en/0b/79553b066d9414e10000000a114084/frameset.htm
    https://help.sap.com/saphelp_nw04/helpdata/en/0c/95c83956852b51e10000000a114084/frameset.htm
    thanks

  • Powershell Excel Chart: want to plot chart by columns

    I have the following Powershell code to create a chart:
    $range = $wb.ActiveSheet.usedRange
    $range.EntireColumn.AutoFit() | Out-Null
    $chartType = "microsoft.office.interop.excel.xlChartType" -as [type]
    $wb.charts.add() | Out-Null
    $wb.ActiveChart.chartType = $chartType::xlColumnClustered
    $wb.ActiveChart.SetSourceData($range)
    $wb.ActiveChart.HasTitle = $true
    $wb.ActiveChart.ChartTitle.Text = "Chart"
    The code creates the chart but it plots it by rows instead of columns (see
    Office KB ). I can change this in Excel manually but is there a way with Powershell to output the chart in columns by default?

    Hi,
    Perhaps setting xlColumns for the PlotBy property will be helpful:
    http://msdn.microsoft.com/en-us/library/office/microsoft.office.interop.excel.chartclass.plotby%28v=office.14%29.aspx
    Don't retire TechNet! -
    (Don't give up yet - 12,420+ strong and growing)

  • Tables - Column vertical alignment

    Good day for everybody,
    I have a table with two columns. The first one has an inputText with 1 line. The second one has an inputText with 3 lines.
    So the row height is calculated to fit the multiline object and, by default the inputText of the first line is bottom aligned.
    I tried to change the first columns vertical alignment by setting the InlineStyle - vertical-align property (setting it to top or middle) but nothing happend.
    So, the question is: How can I change the vertical alignment of the inputText of the first column so it is center or top aligned in its table cell? (Unfortunately I couldn't find this out by myself).
    Thanks in advance for any help.
    A.Gurisatti

    Try nesting your text in a CellFormatted. You can also try nesting it with in a panelGroup. If you are attempting to algin you text with css there is some browser dependencies in play.

  • Column Chart with Columns That Vary in Width

    The subject is Column Chart with Columns That Vary in Width.
    I have been concentrating on the column renderer. Unfortunately,
    the renderer class receives control with access to limited
    information. Mainly, what it gets is pixel counts that measure the
    dimensions of the rectangle that ends up being a column. There is
    no straightforward way to send width information to the renderer. I
    can, however, change the color of the column. I thought of encoding
    the width in the height, but that distorts the actual height,
    potentially causing the chart scale to be computed incorrectly.
    Also, the encoding is hard to reverse once the height in
    transformed by an unknown and varying scale factor so that the
    column fits on the chart. I love the way the column chart looks. I
    only want to alter the width of each individual column. Since I am
    drawing each column, if I knew the widths, I'd be done by now. Do
    you have a better approach? Thanks in advance.

    You need three ColumnSeries. Set the dataProvider of each directly (instead of setting it for the ColumnChart) to something like this:
      var cars:ListCollectionView = new ListCollectionView();
      cars.list = inventory;
      cars.filterFunction = function(item:Object):Boolean {
        return item['category' /* or whatever your category field is */] == 'cars';
    Do something similar for bikes and trucks. You can do something like this if you don't know the number of categories as well, but it's rather trickier (and left as an exercise for the reader).

  • 3 column vertical view

    So i am switching over from Outlook '03 to Mail 2.0. In outlook I could have a three column vertical view of my mail. this would be great on MacBook with its widescreen. It maximizes the number of emails listed by spanning from the top to bottom of the screen and lets one read more on an email with out scrolling.

    > rjkg.com/GS.html), but the center and right columns are
    being pushed
    > down in
    > IE. Here's the css (navbar is left, headlines is right,
    and content is
    > center):
    >
    > #navBar{
    > float: left;
    > width: 20%;
    > margin: 0px;
    > padding: 0px;
    > background-color: #ffddbb;
    > border-right: 1px solid #cccccc;
    > border-bottom: 1px solid #cccccc;
    > }
    >
    > #headlines{
    > float:right;
    > width: 20%;
    > border-left: 1px solid #cccccc;
    > border-bottom: 1px solid #cccccc;
    > padding-right: 10px;
    > background-color: #ffddbb;
    > background: #ffddbb;
    > }
    >
    > #content{
    > float: left;
    > width: 499px;
    > margin-top: 0px;
    > margin-right: 0px;
    > margin-left: 0px;
    > }
    >
    > What do I do to make it showcorrectly in IE?
    >
    > Also, in Firefox, the center column isn't actually
    centered between
    > the two
    > sidebars, but I'd like it to be. Any clues?
    20% + 20% + 499px = ?
    You can't mix measures like that. Try replacing 499 with 60%.
    Your float
    will now drop in all browsers. Why?
    20% + 20% + 60% = 100%
    But the borders and padding you've assigned are added to the
    width,
    resulting in another mathematical improbablility. The easiest
    way to fix
    that is the remove the padding and borders from the main
    boxes and then
    nest content boxes inside the main boxes. Assign your borders
    and
    padding to those nested elements.
    Al Sparber - PVII
    http://www.projectseven.com
    Extending Dreamweaver - Nav Systems | Galleries | Widgets
    Authors: "42nd Street: Mastering the Art of CSS Design"

  • Label postion in column chart near base of chart

    Hi All,
    I am using MSChart to create column chart, here  I am using custom property "LabelStyle" as bottom, but label is showing inside of column but near to end/top of the column only, I want to show my label at the base of column, near
    X-Axis (start of the column). Please help.
    series.SetCustomProperty("LabelStyle",
    "Bottom");

    We can do this by using Annotation, I have created one function which works for me for one or two column series (If you have multiple series then adjust position of Annotation).
            /// <summary>
            /// This will create annotation for each column series, it will work for 1 or 2 series or more no of column series adjust position.
            /// </summary>
            /// <param name="minY">Y Axis point where you want to place annotation, mostly minimum point on Y Axis.</param>
            /// <param name="totalColumnSeries">Total no of column series, to adjust position</param>
            /// <param name="labelFormat">to show in percent, give format as string Eg 0.00%</param>
            /// <param name="offset">Shift X Axis position to left or right</param>
            /// <param name="annFont">Wants to use custom font else take it from Constants.</param>
            public void SetTextAnnotation(double minY, int totalColumnSeries, string labelFormat, double offset, Font annFont = null)
                //double offset = 0;
                int index = 0;
                //if (totalColumnSeries == 2)
                //    offset = 0.2;
                foreach (var series in this.Series)
                    if (series.ChartType == SeriesChartType.Column)
                        int attindex = 1;
                        foreach (var point in series.Points)
                            var ann = new RectangleAnnotation();
                            ann.Text = point.YValues[0].ToString(labelFormat);
                            ann.IsMultiline = false;
                            ann.AxisX = this.ChartAreas[0].AxisX;
                            ann.AxisY = this.ChartAreas[0].AxisY;
                            ann.AnchorX = index == 0 ? attindex - offset : attindex + offset;
                            ann.AnchorY = minY;
                            ann.BackColor = Color.Transparent;
                            ann.LineColor = Color.Transparent;
                            ann.Font = annFont == null ? FONT_CHART_POINT_LABEL : annFont;
                            // add the annotation to the chart annotations list
                            this.Annotations.Add(ann);
                            attindex++;
                        index++;

  • Multiple Line Charts with Column Chart

    I want to show two line charts with a column chart.  Everything goes on the screen fine, except the two line charts origination point always starts at the same point despite the numbers being different.  For example, the ls1 might read 280, 190, 180 and the ls2 is 175, 188, 177 but both origination points start at 280.  The other two datapoints should also be close together but they have a substantial gap of about 50 between them.  Obviosuly I want to have two separate lines.  I have also tried moving the line series below the first lines series with no success.
    <mx:ColumnChart dataTipFunction="formatDataTip"id="
    myChart" dataProvider="
    {FCVData}" showDataTips="
    true"selectionMode="
    single"change="event.stopImmediatePropagation()"
    width="
    100%" height="95%" y="50">
    <!-- vertical axis -->
    <mx:verticalAxis>
    <mx:LinearAxis title="mytitle" labelFunction="defineVerticalLabel"id="
    v1"baseAtZero="
    true" />
    </mx:verticalAxis>
    <mx:horizontalAxis>
    <mx:CategoryAxis dataProvider="
    {MYData}" categoryField="
    YEAR" 
    />
    </mx:horizontalAxis>
    <mx:series>
    <mx:ColumnSeries id="
    pb"color="
    #FFFFFF"xField="
    YEAR" yField="B
    UDGET" displayName="
    Budget"hideDataEffect="
    zoomOut" showDataEffect="
    zoomIn">
    <mx:fill>
    <mx:SolidColor color="{colColor1}"/>
    </mx:fill>
    </mx:ColumnSeries>
    <mx:LineSeries id="ls2" dataProvider="
    {MYData}" yField="
    ACTUAL"displayName="
    Actual" 
    >
    <mx:itemRenderer>  
    <mx:Component>  
    <mx:DiamondItemRenderer/>  
    </mx:Component>  
    </mx:itemRenderer>  
    <mx:lineStroke>
    <mx:Stroke color="
    {lineColor2}" weight="
    5" alpha="
    .5" 
    />
    </mx:lineStroke>  
    <mx:verticalAxis>
    <mx:LinearAxis id="v3" baseAtZero="true"/>
    </mx:verticalAxis>
    </mx:LineSeries>
    <mx:ColumnSeries
    id="
    asytd"color="
    #FFFFFF"xField="
    YEAR" yField="
    SPEND" displayName="
    Spend "hideDataEffect="
    zoomOut" showDataEffect="
    zoomIn">
    <mx:fill>
    <mx:SolidColor color="{colColor2}"/>
    </mx:fill>
    </mx:ColumnSeries>
    <mx:LineSeries id="ls1" dataProvider="
    {MYData}" yField="
    PLAN"displayName="
    Plan" 
    >
    <mx:itemRenderer>  
    <mx:Component>  
    <mx:CrossItemRenderer/>  
    </mx:Component>  
    </mx:itemRenderer>  
    <mx:lineStroke>
    <mx:Stroke color="
    {lineColor1}" weight="
    5" alpha="
    .5" 
    />
    </mx:lineStroke>  
    <mx:verticalAxis>
    <mx:LinearAxis title="title" id="v2" baseAtZero="true"/>
    </mx:verticalAxis>
    </mx:LineSeries>
    </mx:series>
    <mx:verticalAxisRenderers>
    <mx:AxisRenderer placement="left" axis="{v1}"/>
    <mx:AxisRenderer placement="right" axis="{v2}"/>
    <mx:AxisRenderer visible="false" placement="right" axis="{v3}"/>
    </mx:verticalAxisRenderers>
    </mx:ColumnChart>

    Hi,
    Still Trying:
    I've now got this code to function:
    var i:int = 0;
                    for each (var cat:* in event.result.chart.categories.category){
                        //mx.controls.Alert.show(cat.label);
                        var z:int = 0;
                        for each (var valuee:* in event.result.chart.dataset){
                            //mx.controls.Alert.show(event.result.chart.dataset[z].seriesName);
                            //mx.controls.Alert.show(valuee.sete[i].value);
                            z++;
                        i++
    which works fine, how can I get in into Array to make a dataset for the flex charts?
    Thanks,
    Elad

  • NEED HELP IN LABELLING A TRIANGLE _ VERTICES

    PLEASE HELP ______
    import java.awt.*;
    import java.awt.event.*;
    import java.awt.geom.*;
    import java.text.NumberFormat;
    import javax.swing.*;
    import javax.swing.event.*;
    import javax.swing.table.DefaultTableCellRenderer;
    import java.lang.*;
    import java.awt.event.MouseEvent;
    import java.awt.event.MouseMotionListener;
    import java.awt.FileDialog;
    import java.io.*;
    import java.awt.BorderLayout;
    import java.awt.Container;
    import java.awt.event.MouseEvent;
    import java.awt.event.MouseMotionListener;
    import javax.swing.JFrame;
    public class Geometry {
        CardLayout cards;
        JPanel panel;
        public Geometry() {
            cards = new CardLayout();
            panel = new JPanel(cards);
            addCards();
            JFrame f = new JFrame("Geometry");
            f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            f.setJMenuBar(getMenuBar());
            f.getContentPane().add(panel);
            f.setSize(500,500);
            f.setLocation(0,0);
            f.setVisible(true);
            f.addMouseMotionListener(
            new MouseMotionListener() { //anonymous inner class
                //handle mouse drag event
                public void mouseMoved(MouseEvent e) {
                   System.out.println("Mouse  " + e.getX() +","  + e.getY());
                public void mouseDragged(MouseEvent e) {
                    System.out.println("Draggg: x=" + e.getX() + "; y=" + e.getY());
            //            public void mouseMoved(MouseEvent me) {
            //                System.out.println("Moving: x=" + me.getX() + "; y=" + me.getY());
            //        panel.addMouseMotionListener(
            //        new MouseMotionListener() { //anonymous inner class
            //            //handle mouse drag event
            //           public void mouseDragged(MouseEvent me) {
            //               setTitle("Dragging: x=" + me.getX() + "; y=" + me.getY());
            //            public void mouseMoved(MouseEvent me) {
            //                setTitle("Moving: x=" + me.getX() + "; y=" + me.getY());
        private void addCards() {
            // card one
            TriangleModel tri = new TriangleModel(175,100,175,250,325,250);
            TriangleView view  = new TriangleView(tri);
            JPanel panelOne = new JPanel(new BorderLayout());
            panelOne.add(view.getUIPanel(), "North");
            panelOne.add(view);
            panelOne.add(view.getTablePanel(), "South");
            panelOne.setName("Pythagoras's Theorem");
            panel.add("Pythagoras's Theorem", panelOne);
                  view.addMouseMotionListener(
            new MouseMotionListener() { //anonymous inner class
                //handle mouse drag event
                 public void mouseMoved(MouseEvent e) {
                    System.out.println("Mouse at " + e.getX() +","  + e.getY());
               public void mouseDragged(MouseEvent e) {
                   System.out.println("Dragging: x=" + e.getX() + "; y=" + e.getY());
            // card two
            TestModel trin = new TestModel(175,100,175,250,325,250);
            TestView viewn  = new TestView(trin);
            JPanel panelTwo = new JPanel(new BorderLayout());
            panelTwo.add(viewn.getUIPanel(), "North");
          // panelTwo.setBackground(Color.blue);
            panelTwo.setName("Similar Triangles");
            panelTwo.add(viewn);
            panelTwo.add(viewn.getTablePanel(), "South");
                  viewn.addMouseMotionListener(
            new MouseMotionListener() { //anonymous inner class
                //handle mouse drag event
                 public void mouseMoved(MouseEvent e) {
                    System.out.println("Mouse at " + e.getX() +","  + e.getY());
               public void mouseDragged(MouseEvent e) {
                   System.out.println("Dragging: x=" + e.getX() + "; y=" + e.getY());
            panel.add("Similar Triangles", panelTwo);
            JPanel panelThree = new JPanel();
            panelThree.setBackground(Color.white);
            panelThree.setName("Circle Theorem1");
            panel.add("Circle Theorem1", panelThree);
        private JMenuBar getMenuBar() {
            JMenu File = new JMenu("File");
            JSeparator separator1 = new JSeparator();
            JMenuItem Open = new JMenuItem("Open");
    //         Open.addActionListener(new java.awt.event.ActionListener() {
    //            public void actionPerformed(java.awt.event.ActionEvent evt) {
    //                openActionPerformed(evt);
            JMenuItem Save = new JMenuItem("Save");
            JMenuItem Print = new JMenuItem("Print");
            JMenuItem Exit = new JMenuItem("Exit");
            Exit.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    ExitActionPerformed(evt);
            JMenu theorem = new JMenu("Theorem");
            ActionListener l = new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    JMenuItem item = (JMenuItem)e.getSource();
                    String name = item.getActionCommand();
                    cards.show(panel, name);
            Component[] c = panel.getComponents();
            for(int j = 0; j < panel.getComponentCount(); j++) {
                String name = c[j].getName();
                JMenuItem item = new JMenuItem(name);
                item.setActionCommand(name);
                item.addActionListener(l);
                theorem.add(item);
            JMenuBar menuBar = new JMenuBar();
            JMenuBar menuBar1 = new JMenuBar();
            menuBar.add(File);
            File.add(Open);
            File.add(separator1);
            File.add(Save);
            File.add(Print);       
            File.add(Exit);
            menuBar.add(theorem);
            return menuBar;
    //    private void openActionPerformed(java.awt.event.ActionEvent evt) {
    //        FileDialog fileDialog = new FileDialog(this, "Open...", FileDialog.LOAD);
    //        fileDialog.show();
    //        if (fileDialog.getFile() == null)
    //            return;
    //        fileName = fileDialog.getDirectory() + File.separator + fileDialog.getFile();
    //        FileInputStream fis = null;
    //        String str = null;
    //        try {
    //            fis = new FileInputStream(fileName);
    //            int size = fis.available();
    //            byte[] bytes = new byte [size];
    //            fis.read(bytes);
    //            str = new String(bytes);
    //        } catch (IOException e) {
    //        } finally {
    //            try {
    //                fis.close();
    //            } catch (IOException e2) {
    //        if (str != null)
    //            textBox.setText(str);
        private void ExitActionPerformed(java.awt.event.ActionEvent evt) {
            // TODO add your handling code here:
            System.exit(0);
        public static void main(String[] args) {
            new Geometry();
    import java.awt.*;
    import java.awt.event.*;
    import java.awt.geom.*;
    import java.text.NumberFormat;
    import javax.swing.*;
    import javax.swing.event.*;
    import javax.swing.table.DefaultTableCellRenderer;
    public class Triangle
    public Triangle()
    TriangleModel tri = new TriangleModel(175,100,175,250,325,250);
    TriangleView view = new TriangleView(tri);
    JFrame f = new JFrame();
    f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    f.getContentPane().add(view.getUIPanel(), "North");
    f.getContentPane().add(view);
    f.getContentPane().add(view.getTablePanel(), "South");
    f.setSize(500,500);
    f.setLocation(200,200);
    f.setVisible(true);
    import java.awt.Point;
    import java.awt.Rectangle;
    import java.awt.event.MouseEvent;
    import javax.swing.JTable;
    import javax.swing.event.MouseInputAdapter;
    * TriangleControl.java
    * Created on 06 February 2005, 01:19
    * @author  Rahindra Naidoo
    public class TriangleControl extends MouseInputAdapter
        TriangleView view;
        TriangleModel model;
        Point start;
        boolean dragging, altering;
        Rectangle lineLens;            // used for line selection
        public TriangleControl(TriangleView tv)
            view = tv;
            model = view.getModel();
            dragging = altering = false;
            lineLens = new Rectangle(0, 0, 6, 6);
        public void mousePressed(MouseEvent e)
            Point p = e.getPoint();
            lineLens.setLocation(p.x - 3, p.y - 3);
            // are we over a line
            if(model.isLineSelected(lineLens))
                start = p;
                altering = true;
            // or are we within the triangle
            else if(model.contains(p))
                start = p;
                dragging = true;
        public void mouseReleased(MouseEvent e)
            altering = false;
            dragging = false;
            view.getCentroidLabel().setText("centroid location: " +
                                             model.findCentroid());
            view.repaint();  // for the construction lines
        public void mouseDragged(MouseEvent e)
            Point p = e.getPoint();
            if(altering)
                int x = p.x - start.x;
                int y = p.y - start.y;
                model.moveSide(x, y, p);
                updateTable();
                view.repaint();
                start = p;
            else if(dragging)
                int x = p.x - start.x;
                int y = p.y - start.y;
                model.translate(x, y);
                view.repaint();
                start = p;
        private void updateTable()
            String[] lengths = model.getLengths();
            String[] squares = model.getSquares();
            String[] angles  = model.getAngles();
            JTable table = view.getTable();
            for(int j = 0; j < angles.length; j++)
                table.setValueAt(lengths[j], 1, j + 1);
                table.setValueAt(squares[j], 2, j + 1);
                table.setValueAt(angles[j],  3, j + 1);
            view.getCentroidLabel().setText("centroid location: " +
                                             model.findCentroid());
    * TriangleModel.java
    * Created on 06 February 2005, 01:18
    import java.awt.*;
    import java.awt.event.*;
    import java.awt.geom.*;
    import java.text.NumberFormat;
    import javax.swing.*;
    import javax.swing.event.*;
    import javax.swing.table.DefaultTableCellRenderer;
    * @author  Rahindra Naidoo
    public class TriangleModel                      //  (x1, y1)
    {                                         //      |\
        static final int SIDES = 3;         //      | \
        private int cx, cy;                  //      |  \
        Polygon triangle;                     //      |_ _\ (x3, y3)
        int selectedIndex;                   //  (x2, y2)
        NumberFormat nf;
        Line2D[] medians;
        Point2D centroid;
        public TriangleModel(int x1, int y1, int x2, int y2, int x3, int y3)
            int[] x = new int[] { x1, x2, x3 };
            int[] y = new int[] { y1, y2, y3 };
            triangle = new Polygon(x, y, SIDES);
            nf = NumberFormat.getNumberInstance();
            nf.setMaximumFractionDigits(1);
        public boolean contains(Point p)
            // Polygon.contains doesn't work well enough
            return (new Area(triangle)).contains(p);
        public boolean isLineSelected(Rectangle r)
            Line2D line = new Line2D.Double();
            for(int j = 0; j < SIDES; j++)
                int[] x = triangle.xpoints;
                int[] y = triangle.ypoints;
                int x1 = x[j];
                int y1 = y[j];
                int x2 = x[(j + 1) % SIDES];
                int y2 = y[(j + 1) % SIDES];
                line.setLine(x1, y1, x2, y2);
                if(line.intersects(r))
                    selectedIndex = j;
                    return true;
            selectedIndex = -1;
            return false;
         * Only works for right triangle with right angle at (x2, y2)
        public void moveSide(int dx, int dy, Point p)
            int[] x = triangle.xpoints;
            int[] y = triangle.ypoints;
            switch(selectedIndex)
                case 0:
                    x[0] += dx;
                    x[1] += dx;
                    break;
                case 1:
                    y[1] += dy;
                    y[2] += dy;
                    break;
                case 2:
                    double rise  = y[2] - y[0];
                    double run   = x[2] - x[0];
                    double slope = rise/run;
                    // rise / run == (y[2] - p.y) / (x[2] - p.x)
                    x[2] = p.x + (int)((y[2] - p.y) / slope);
                    // rise / run == (p.y - y[0]) / (p.x - x[0])
                    y[0] = p.y - (int)((p.x - x[0]) * slope);
        public void translate(int dx, int dy)
            triangle.translate(dx, dy);
        public Polygon getTriangle()
            return triangle;
        public String findCentroid()
            int[] x = triangle.xpoints;
            int[] y = triangle.ypoints;
            // construct the medians defined as the line from
            // any vertex to the midpoint of the opposite line
            medians = new Line2D[x.length];
            for(int j = 0; j < x.length; j++)
                int next = (j + 1) % x.length;
                int last = (j + 2) % x.length;
                Point2D vertex = new Point2D.Double(x[j], y[j]);
                // get midpoint of line opposite vertex
                double dx = ((double)x[last] - x[next])/2;
                double dy = ((double)y[last] - y[next])/2;
                Point2D oppLineCenter = new Point2D.Double(x[next] + dx,
                                                           y[next] + dy);
                medians[j] = new Line2D.Double(vertex, oppLineCenter);
            // centroid is located on any median 2/3 the way from the
            // vertex (P1) to the midpoint (P2) on the opposite side
            double[] lengths = getSideLengths();
            double dx = (medians[0].getX2() - medians[0].getX1())*2/3;
            double dy = (medians[0].getY2() - medians[0].getY1())*2/3;
            double px = medians[0].getX1() + dx;
            double py = medians[0].getY1() + dy;
            //System.out.println("px = " + nf.format(px) +
            //                 "\tpy = " + nf.format(py));
            centroid = new Point2D.Double(px, py);
            return "(" + nf.format(px) + ",  " + nf.format(py) + ")";
        public String[] getAngles()
            double[] lengths = getSideLengths();
            String[] vertices = new String[lengths.length];
            for(int j = 0; j < lengths.length; j++)
                int opp  = (j + 1) % lengths.length;
                int last = (j + 2) % lengths.length;
                double top = lengths[j] * lengths[j] +
                             lengths[last] * lengths[last] -
                             lengths[opp] * lengths[opp];
                double divisor = 2 * lengths[j] * lengths[last];
                double vertex = Math.acos(top / divisor);
                vertices[j] = nf.format(Math.toDegrees(vertex));
            return vertices;
        public String[] getLengths()
            double[] lengths = getSideLengths();
            String[] lengthStrs = new String[lengths.length];
            for(int j = 0; j < lengthStrs.length; j++)
                lengthStrs[j] = nf.format(lengths[j]);
            return lengthStrs;
        public String[] getSquares()
            double[] lengths = getSideLengths();
            String[] squareStrs = new String[lengths.length];
            for(int j = 0; j < squareStrs.length; j++)
                squareStrs[j] = nf.format(lengths[j] * lengths[j]);
            return squareStrs;
        private double[] getSideLengths()
            int[] x = triangle.xpoints;
            int[] y = triangle.ypoints;
            double[] lengths = new double[SIDES];
            for(int j = 0; j < SIDES; j++)
                int next = (j + 1) % SIDES;
                lengths[j] = Point.distance(x[j], y[j], x[next], y[next]);
            return lengths;
    import java.awt.*;
    import java.awt.event.*;
    import java.awt.geom.*;
    import java.text.NumberFormat;
    import javax.swing.*;
    import javax.swing.event.*;
    import javax.swing.table.DefaultTableCellRenderer;
    * TriangleView.java
    * Created on 06 February 2005, 01:21
    public class TriangleView extends JPanel
        private TriangleModel model;
        private Polygon triangle;
        private JTable table;
        private JLabel centroidLabel;
        private boolean showConstruction;
        TriangleControl control;
        public TriangleView(TriangleModel model)
            this.model = model;
            triangle = model.getTriangle();
            showConstruction = false;
            control = new TriangleControl(this);
            addMouseListener(control);
            addMouseMotionListener(control);
        public void paintComponent(Graphics g)
            super.paintComponent(g);
            Graphics2D g2 = (Graphics2D)g;
            g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
                                RenderingHints.VALUE_ANTIALIAS_ON);
            g2.draw(triangle);
            if(model.medians == null)
                centroidLabel.setText("centroid location: " + model.findCentroid());
            // draw medians and centroid point
            if(showConstruction && !control.dragging)
                g2.setPaint(Color.red);
                for(int j = 0; j < 3; j++)
                    g2.draw(model.medians[j]);
                g2.setPaint(Color.blue);
                g2.fill(new Ellipse2D.Double(model.centroid.getX() - 2,
                                             model.centroid.getY() - 2, 4, 4));
        public TriangleModel getModel()
            return model;
        public JTable getTable()
            return table;
        public JLabel getCentroidLabel()
            return centroidLabel;
        public JPanel getUIPanel()
            JCheckBox showCon = new JCheckBox("show construction");
            showCon.addActionListener(new ActionListener()
                public void actionPerformed(ActionEvent e)
                    boolean state = ((JCheckBox)e.getSource()).isSelected();
                    showConstruction = state;
                    repaint();
            JPanel panel = new JPanel();
            panel.add(showCon);
            return panel;
        public JPanel getTablePanel()
            String[] headers = new String[] { "", "", "", "" };
            // row and column data labels
            String[] rowHeaders = {
                "sides", "lengths", "squares", "angles", "degrees"
            String[] sidesRow = { "vertical", "horizontal", "hypotenuse" };
            String[] anglesRow = { "hyp to ver", "ver to hor", "hor to hyp" };
            // collect data from model
            String[] angles  = model.getAngles();
            String[] lengths = model.getLengths();
            String[] squares = model.getSquares();
            String[][] allData = { sidesRow, lengths, squares, anglesRow, angles };
            int rows = 5;
            int cols = 4;
            Object[][] data = new Object[rows][cols];
            for(int row = 0; row < rows; row++)
                data[row][0] = rowHeaders[row];
                for(int col = 1; col < cols; col++)
                    data[row][col] = allData[row][col - 1];
            table = new JTable(data, headers)
                public boolean isCellEditable(int row, int col)
                    return false;
            DefaultTableCellRenderer renderer =
                (DefaultTableCellRenderer)table.getDefaultRenderer(String.class);
            renderer.setHorizontalAlignment(JLabel.CENTER);
            centroidLabel = new JLabel("centroid location:  ", JLabel.CENTER);
            Dimension d = centroidLabel.getPreferredSize();
            d.height = table.getRowHeight();
            centroidLabel.setPreferredSize(d);
            JPanel panel = new JPanel(new BorderLayout());
            panel.setBorder(BorderFactory.createTitledBorder("triangle data"));
            panel.add(table);
            panel.add(centroidLabel, "South");
            return panel;
    }PLEASE HELP ME TO LABEL THE TRIANGLE AND CHANGE THE VALUES OF THE JTABLE - to SHOW ASquare b Square and C square as well as a label on the bottom of the screen to show A^2 + B^2 = C^2 ...
    ThANKS

        public void paintComponent(Graphics g) {
            super.paintComponent(g);
            Graphics2D g2 = (Graphics2D)g;
            g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
                    RenderingHints.VALUE_ANTIALIAS_ON);
            g2.drawPolygon(triangle);
            // label the triangle
            String[] lengths = model.getLengths();
            String[] squares = model.getSquares();
            String[] angles  = model.getAngles();
            int[] x = triangle.xpoints;
            int[] y = triangle.ypoints;
            for(int j = 0; j < x.length; j++) {
                Point2D vertex = new Point2D.Double(x[j], y[j]);
                int next = (j + 0) % x.length;
                int last = (j + 1) % x.length;
                double dx = ((double)x[last] - x[next])/2;
                double dy = ((double)y[last] - y[next])/2;
                Point2D center = new Point2D.Double(x[next] + dx, y[next] + dy);
                g2.drawString(angles[j],(int)vertex.getX(),(int)vertex.getY());
                g2.drawString(lengths[j],(int)center.getX(),(int)center.getY());
            g2.drawString(squares[0],100, getHeight());
            g2.drawString(" + "+squares[1],150, getHeight());
            g2.drawString(" = "+squares[2],200, getHeight());
            if(model.medians == null)
                centroidLabel.setText("centroid location: " + model.findCentroid());
            // draw medians and centroid point
            if(showConstruction && !control.dragging) {
                g2.setPaint(Color.red);
                for(int j = 0; j < 3; j++)
                    g2.draw(model.medians[j]);
                g2.setPaint(Color.blue);
                g2.fill(new Ellipse2D.Double(model.centroid.getX() - 2,
                        model.centroid.getY() - 2, 4, 4));
        }

  • SSRS show trend chart over column chart per series groups

    Need help in designing following report in SSRS, where I have a chart report with 2 category grouping fields and 1 series group field (as with category grouping, the reason being, i need to show columns in group of 4 joined together based on their grouping
    on top) .
    Below are my queries
    1. how to show my category grouping values on top of chart (showing group in different color) and series grouping values on bottom of chart (under each bar)
    2. I need to show trend line over each series group data.
    For example, First category group is over hotel name, second category group is over room type (deluxe, executive & suite) and one Series group over week number (for a month report), and the chart value is total occupancy (per hotel per room type per week
    number). Now for point 1, Hotel name and room type needs to be on top of the column (total occupancy) chart, where a week iteration number (1,2,3,4 for a month) at the bottom of the chart under every column.
    And for point 2, I need to show trend line per room per week occupancy was improved or not.
    Regards, Sujay

    Hi Sujay,
    According to your description, you want to display the two category group values at the top of the total occupancy value. Also you want to create a trend line over series values.
    For your first requirement, you can specify the Label data as a combination of two category group values and total occupancy values. Then change the location of series group value legend. Please refer to below screenshot.
    For your second requirement, you can add additional total occupancy values to the Chart Data panel, then change the chart type as Smooth Line.
    If you have any question, please feel free to ask.
    Best regards,
    Qiuyun Yu
    Qiuyun Yu
    TechNet Community Support

  • How to add text labels to computed column totals in a banded report?

    I'm sure I'm missing something obvious here. I have a simple report with a table that consists of 3 DB field columns and 3 computed columns. I have the 'show column total' property enabled and it inserts the totals at the bottom of the computed columns. What I haven't been able to do is insert a label to the left of the computed totals. I tried inserting a blank field and adding my label, but the location is not dynamic - if one grouped item has 3 rows and the next has 4 the inserted field does not flow to the bottom of the table for each group, it displays in the same position for each group.
    What property/option am I not seeing?
    Thanks!
    Edited by: user11293154 on Jun 22, 2009 1:03 PM

    Thanks for the reply. I'm using Interactive Studio version 9.3, but can't find the 'Set Spring' feature. The help file doesn't have a reference to it. There is a Spring(method) with this example;
    ActiveDocument.Sections["Report"].Body.Tables["Table"].Spring("Chart")ActiveDocument.Sections["Report"].Body.Tables["Table"].Spring("Pivot")

  • Help, my chart-problem columns

    hello.
    i used adobe flex build 3.0. Now i had problem about my chart
    i want to create LineChart. I have date. And my date update  minute by minute. My chart  have 16 spaces
    : (8h-9h), (9h-10h)....(22h-23h).
    I want my chart show as the picture blow:
    Or
    But Now i don't know how i can like.
    i only created as the picture blow:
    The columns are not standar, not same Identical.Pls See clear the Picture above and blow and Help me
    Now my Code
    <?xml version="1.0"?>
    <!-- http://blog.flexexamples.com/2007/11/19 … ick-marks/ -->
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
            layout="vertical"
            verticalAlign="middle"
            backgroundColor="white">
        <mx:Script>
            <![CDATA[
                import mx.charts.HitData;
                import mx.charts.CategoryAxis;
                import mx.charts.chartClasses.IAxis;
                import  mx.charts.GridLines;
                import mx.collections.ArrayCollection;
                import mx.graphics.Stroke;
                import mx.events.ColorPickerEvent;           
                private function linearAxis_labelFunc(item:Object, prevValue:Object, axis:IAxis):String
                    return currFormatter.format(item);               
                private function categoryAxis_labelFunc(item:Object, prevValue:Object, axis:CategoryAxis, categoryItem:Object):String
                    return item.valueOf().toString();            
                private function renderTips(hd:HitData):String
                  return "aaaaaaaaaaaaaa bbbbbbbbbbb";
            ]]>
        </mx:Script>
        <mx:CurrencyFormatter id="currFormatter" precision="2" />  
        <mx:XMLListCollection id="dp12">
            <mx:source>
                <mx:XMLList>
                    <quote date="8h" open="90.1" />
                    <quote open="90.1" /> 
                    <quote open="90.1" />                                
                    <quote date="9h"  open="45.5" /> 
                    <quote open="90.1" /> 
                    <quote open="90.1" />         
                    <quote date="10h" open="40.82" />                                           
                    <quote date="11h" open="21.4"  />                
                    <quote date="12h" open="40.41"  />              
                    <quote date="13h" open="40.55"  />
                    <quote date="14h" open="40.18" />             
                    <quote date="15h" open="39.83"  />               
                    <quote date="16h" open="40.22" /> 
                    <quote open="90.1" /> 
                    <quote open="90.1" />                
                    <quote date="17h" open="41.01" /> 
                    <quote date="18h" open="41.21"   />                
                    <quote date="19h" open="32.00" />                 
                    <quote date="20h" open="45.00" />               
                    <quote date="21h" open="29"/>              
                    <quote date="22h" open="30.00" />              
                    <quote date="23h" open="40" />                             
                    </mx:XMLList>
            </mx:source>
        </mx:XMLListCollection>     
        <mx:LineChart id="lineChart" showDataTips="true" color="black"
            dataProvider="{dp12}"  width="100%" height="100%" alpha="1.0"
             >
            <!-- background elements -->
            <mx:backgroundElements>
                <mx:GridLines id="gridLines" toolTip="Tony adam" direction="both"
                    horizontalTickAligned="true" themeColor="red" alpha="5">                              
                    <mx:horizontalFill>
                        <mx:SolidColor color="white" alpha="5.0"  />
                    </mx:horizontalFill>               
                    <mx:horizontalAlternateFill>
                        <mx:SolidColor color="white" alpha="5.0" />
                    </mx:horizontalAlternateFill>                                             
                </mx:GridLines>
            </mx:backgroundElements>
            <!-- vertical axis -->
            <mx:verticalAxis>
                <mx:LinearAxis baseAtZero="true"
                        title="Price"
                         />
            </mx:verticalAxis>
            <!-- horizontal axis -->
            <mx:horizontalAxis>
                <mx:CategoryAxis id="ca"
                        categoryField="@date"
                        title="Tháng 6 Năm 2009"
                        />
            </mx:horizontalAxis>
            <!-- horizontal axis renderer -->
           <mx:horizontalAxisRenderers>
                <!--<mx:AxisRenderer axis="{ca}" canDropLabels="false" />-->
                <mx:AxisRenderer canDropLabels="true" placement="bottom"
                axis="{ca}" tickPlacement="inside"
                tickLength="100" minorTickPlacement="inside"
                minorTickLength="15"      
                />   
            </mx:horizontalAxisRenderers>
            <!-- series -->
            <mx:series>                              
                 <mx:LineSeries yField="@open" displayName="open" xField="@date"
                     interpolateValues="true" form="curve" themeColor="black">
                  <mx:lineStroke>
                        <mx:Stroke color="#3333FF" weight="1" alpha="3.1" scaleMode="vertical"/>               
                 </mx:lineStroke>
                 </mx:LineSeries>     
            </mx:series>      
            <!-- series filters -->
            <mx:seriesFilters>
                <mx:Array />
            </mx:seriesFilters>
        </mx:LineChart>   
    </mx:Application>

    altenbach, Thanks a ton for your assistance. I have gained serious insight by examining how you approached this. I am able to see how my thinking was somewhat flawed. Here is the vi I used to write the file. I have also included another sample .bin file (which needs to be renamed to .bin), and a subvi I built to generate filenames based on time stamps.
    This is part of a system we are trying to build to monitor some of our equipment 24/7. The plan is to use this data to monitor long term degradation of the equipment in order to perform preventive maintenance, before problems occur. I work in a Nuclear plant, so problems can be serious...
    In the final application the "Trigger" will be set by a physical input. For example, when a fuelling machine component is commanded to move we will start the data acquisition and when the machine is commanded to stop, the acqusition stops. The plan is to archive all of the data, and any analysis would be done by the system engineers later.
    We would like to able to examine the entire data file which would be captured. A typical movement of our machine might last for as long as 2 minutes. We want to capture all of this time period, but we might need to examine only a couple of seconds anywhere within this window.
    Thanks again for your insight. 5 Stars across the board....
    technomage
    Attachments:
    12-09-2006-074635.txt ‏766 KB
    write.vi ‏82 KB
    Filename Generator.vi ‏20 KB

  • VC Chart Combo Columns+Lines

    I have created a nice combo chart but I only see an information for one axis.  I need Value axis for each series.  Is this possible?  I am charting revenue as the column -- assume large numbers.  And I am charting # of orders assume very low.  I need axis info on left and right of chart.  How please?

    Jeff,
    We cannot have multiple scales with VC [data-series (labels i.e.) are always on the x-axis and the corresponding values on the y-axis] . Given your scenario, if you use combo charts (since they're stacked for columns), this may not be the best option to display the nos..maybe u could use a bar/column chart instead
    prachi

Maybe you are looking for

  • Something like Gradient Map in InDesign?

    Hi, Wondering if in the new version of InDesign (CS6) there might be any way to do anything similar to the Gradient Map adjustment layer in Photoshop? I'm open to a plugin or any way to use a Photoshop adjustment layer in InDesign if that's at all po

  • What is the best practice dealing with process.getErrorStream()

    I've been playing around creating Process objects with ProcessBuilder. I can use getErrorStream() and getOutputStream() to read the output from the process, but it seems I have to do this on another thread. If I simply call process.waitFor() and then

  • I just want to make it go back to spry tabs default like when I started.

    I am new with spry tabs and I was messing around with the css changing things " this is how I learn trial and error" well I clicked something and it messed up my tabs and so I though no prob I will just start over but when I go to put the spry tabs i

  • PDFs and error -10660

    When double clicking on a PDF file I am now getting an error message that says "The operation could not be completed. An unexpected error occurred (error code -10660)." I am able to open the files from within the application Acrobat Reader 7.0.5, but

  • MD01 and MD02

    I've encountered a problem that I'm hoping will help me understand the MRP process a bit. I have a material with an independent requirement with no existing inventory.  If I run MRP using MD01, MRP doesn't plan the material.  However, if I use MD02,