Announcement

Collapse
No announcement yet.

Open project ... Convert table data to bar graph

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Open project ... Convert table data to bar graph

    Peace and God's mercy and blessings be upon you

    We want to convert table data to a bar graph
    Of course, the addition of PieChart converts the structures into a graph, but in the form of a circle divided according to percentages.
    In the open project, we refer to the data grid element
    Of course we specify in the column of columns the number of columns and in the column of the last number of lines
    ------- In our example, we suffice with two columns until the code is modified to accept an unlimited number of columns --------------
    According to the number of columns and lines, we use the code to display the posts as required, and variables are Nrow for the number of lines, and Ncol is for the number of columns.

    [PHP] Grid.SetRowCount ("Grid1", Nrow);
    Grid.SetColumnCount ("Grid1", Ncol);
    [/ PHP]

    Then we draw a horizontal line that represents the number of lines, i.e. elements of the border, for example, the number of sections or books .........
    Then we consider the length of the line to be the reference and place the columns in order according to the number of the table
    The same thing we make a vertical line and its length is the reference
    Now we put all the values ​​in the unique in a matrix. Then we extract the largest ones and put it is the length of the column degradation.
    Then we assign all other values ​​to this length

    Then using pageCreat to create images and specify their length according to the values
    [PHP] Page.CreateObject (OBJECT_IMAGE, "A" .. i, tblImageProps)
    [/ PHP]


    The same function for creating a banner at the bottom of each image represents the column name and another banner above the oud in which the column value is

    [PHP] Page.CreateObject (OBJECT_LABEL, "LB" .. i, tblLabelProps);
    [/ PHP]

    Explanation of the project form

    [IMG] https://e.top4top.net/p_6866nfjb1.gif [/ IMG]

    Open file:
    [url] https://up.top4top.net/downloadf-686ghso81-rar.html [/ url]


    Good luck [/ QUOTE]

  • #2


    Source_Project

    Comment

    Working...
    X
    😀
    🥰
    🤢
    😎
    😡
    👍
    👎