top in the chart

This public forum is for user-to-user discussions of PHPMaker. Note that this is not support forum.
Post Reply
vladsn07
User
Posts: 13

top in the chart

Post by vladsn07 »

How to set the top in the chart. Those. In the diagram output only the first 10 or 15 conditions.

It is necessary to display only the first 10 data from the report


arbei
User
Posts: 9354

Post by arbei »

Setup "Records per page" to 10 and hide the paging section with jQuery .hide() function in Startup Script.

For example:
$(".panel-footer").hide();


vladsn07
User
Posts: 13

Post by vladsn07 »

Where do I set this parameter?

I need to output the amount in the diagram that is indicated in the panel-footer

Example

Page << < 1 > >> of 12878 Records 1 to 5 of 64389 5

On the table there are 5 lines, accordingly to deduce 5 positions in the diagram


arbei
User
Posts: 9354

Post by arbei »

Records Per Page is in [TABLE] -> [Table-specific Options].

And use the jQuery function in "Server Events and Client Scripts" -> "Startup Scripts"

Read help file topic: "Project Setup" -> "Table Setup" and "Server Events and Client Scripts" -> "Startup Scripts".


vladsn07
User
Posts: 13

Post by vladsn07 »

I have 4 columns. Id, date, number1, number2. It is necessary to display in the table the sum of all numbers by number1 + number2 and display them on the diagram as a percentage number / number2, for example 30% and 70%. If the number of id is too much, then output only the first 10, coming from the sorted table.

In my case, the number 1 and the number 2 depend on other data that I specify in the filters.

t-sql:
Select dbo.we_OrgUnits.Description Department,
dbo.we_Computers.FriendlyName Inv â„–,
dbo.we_SummaryActivities.LogDate Date,
dbo.we_SummaryActivities.ActivityTime ActivityTime,
dbo.we_SummaryActivities.ForegroundTime ForgeroundTime
From dbo.we_Computers
Inner Join dbo.we_SummaryActivities On dbo.we_SummaryActivities.ComputerId =
dbo.we_Computers.ComputerId
Inner Join dbo.we_OrgUnits On dbo.we_OrgUnits.OrgUnitId =
dbo.we_Computers.ParentId

ActivityTime - number1
ForgeroundTime - number2


arbei
User
Posts: 9354

Post by arbei »

If you want to show the value number1 + number2 and percentage of number1/number2, you can use the feature custom field.
Read help file topic: "Project Setup" -> "Custom Field" for more information.


arbei
User
Posts: 9354

Post by arbei »

To show the first 10 records in your database view, set up the "Records Per Page" is in [TABLE] -> [Table-specific Options].
Then hide the pager with the "Startup Script".

(Refer to the previous post)

And create 2 custom field to show the SUM and Percentage of the "ActivityTime" and "ForgeroundTime"

For example:
Field Name: Sum_Time
Caption: Sum_Time
Expression: ActivityTime + ForgeroundTime

Field Name: Percentage_Time
Caption: Percentage_Time
Expression: ActivityTime / (ActivityTime + ForgerounTime) * 100

Read help file topic: "Project Setup" -> "Custom Field" for more information.


vladsn07
User
Posts: 13

Post by vladsn07 »

I want to display only 5 first values from the view. Now everyone comes out, i.e. All 50


arbei
User
Posts: 9354

Post by arbei »

To show the specific number of records in your database view, set up the "Records Per Page" is in [TABLE] -> [Table-specific Options].


vladsn07
User
Posts: 13

Post by vladsn07 »

This concerns the table, how does this parameter pass the Chart?


arbei
User
Posts: 9354

Post by arbei »

vladsn07 wrote:
This concerns the table, how does this parameter pass the Chart?

It is not supported.


vladsn07
User
Posts: 13

Post by vladsn07 »

Thanks, understand


vladsn07
User
Posts: 13

Post by vladsn07 »

I did not understand how to output a limited amount of data to the chart? Example: TOP 10


arbei
User
Posts: 9354

Post by arbei »

You cannot limit the number of records output to the chart, you can only filter the records. (The data for the report is the same as that for the chart.)

Or you can try to remove some node from the chartxml in Chart_Rendered Server Event.

Read the help file topic: "Server Events and Client Scripts" -> "Chart_Rendered" for more information.


vladsn07
User
Posts: 13

Post by vladsn07 »

Thanks, understand


Post Reply