TeeChart, "skip" rows value when column marked "Exclude" - delphi

Delphi XE3
Steema VCL Charting
I have a data source with 12 rows. Each row has a vertical bar. I have a column in the table that is called Exclude. If Exclude is True I do not want it to “draw” the bar for that rows value. How can I exclude some rows values from being charted programmatically? The pseudo code would be…
If Exclude <> True then draw bar ;
If someone changes the Exclude value I want to redraw the graph to reflect the change in that rows value which means if Exclude is True the bar does not get drawn.

The easiest way to do that is using the SetNull method to make a bar null and hence not being painted, for example:
if Exclude then Series1.SetNull(Index);
you can revert that calling SetNull like this:
Series1.SetNull(Index, False);

Related

how can i combine cells in fastreport?

i have a table. to print like this
https://up.djelfa.info/uploads/155762484493151.png
I want to make the observation take the whole table means it remains empty. The empty box takes all the table.
https://up.djelfa.info/uploads/155762492124361.png
im working with fastreport 5 vcl
master data
https://up.djelfa.info/uploads/155762509600791.png
Per your last link, it appears that you have hard-drawn the cell lines in your master data row. This means they will print for each row. There are, however, multiple ways to get around this:
Make the upper and lower lines for your Observation column separate objects (e.g. LineObsTop and LineObsBottom). Then, in the MasterData Band's OnBeforePrint, adjust the visibility of these based on the values of the column
Don't hard-code cell lines! Instead, make sure the cell fields all align perfectly and use the fields' Frame properties. Then use the Observation field's OnBeforePrint to adjust the frame based on value.
Similar to #2, but use conditional formatting for the cell, adjusting the frame.

Angular UI-grid, how to tell what the next column in the scroll is

I have a ui grid that has 20 columns, and I would like to be able to tell what the next column will be as I scroll through the horizontal axis so that I can have some text that will tell the users what the names of all the columns they can't see are.
Anyone know if this is possible? As I watch the the inspector and scroll through the columns, I see html attributes changing.
---UPDATE 1----
This is what is all looks like (where it says "home #" is dynamic and will change to show the next column that is out of site)
Based on the ui-grid configuration that you use to render the grid, you already know the order of the columns. You can use this information together with the visible on each column added by the gird itself.
What you need to do is bind a event handler on scroll to iterate over the columns on each change and check the visibility of them. Then the first one with visible === false is the upcoming.
Here is a working Plunker where is used this flag.

TcxGrid column is hidden when dragging to group row

I have two seemingly identical TcxGrids bound to two different tables. On one grid, when the column header is dragged and dropped to the group panel, a large X appears above the column being dragged, when it is dropped the column is immediately hidden. On the other grid a big circle with a line through it shows and it cannot be dropped on to the group panel. The Options.Grouping for both columns is false. Why the difference in the two behaviors ? I cannot see a property setting difference but I'm sure there must be one somewhere that causes this behavior. What property is it ?
John
Inspect the properties of the column which won't group in the Object Inspector. Probably, you'll find that its DisableGrouping property is set to True. If it is, set it to False. If that doesn't work, a) I'll take this answer down and b) edit your q to add the contents of your DFM.
There are two places in DX grid that control the ability to group columns. First is at the grid level and it takes precedent over the columns' individual Options.Grouping settings. Second is at the column level. Look at .OptionCustomize.ColumnGrouping. It may be set to False.

VirtualTreeview enabling and disabling columns

I have a VirtualTreeView which has some columns initially hidden (coVisible is not present).
After enabling them (adding coVisible to the column Options) a strange thing happens - column appears but overlaps with previous column. I can fix the problem by changing width to 1 pixel smaller, then back to original width of the column which forces some repaint which then displays column correctly.
Is there something I need to do additionally except adding coVisible to make the columns repaint properly?
Use:
VTV.Header.Columns.BeginUpdate;
try
// Enable or Disable columns...
finally
VTV.Header.Columns.EndUpdate;
end;
This should keep the Header.Columns in sync.

How to hide a column in TListview?

I am using a listview to store and show data.
How can i hide and show a column in listview?
Dont tell me to set the column width to 0 please!!!!
In the Delphi TListView you can't hide columns in vsReport view style. Your only option is to delete the column when you need to hide it, and create it again when you need to show it.
This is yet another example of why virtual list views are much more desirable than non-virtual list views. With a virtual list view you can insert new columns without having to iterate across all items in the list and re-populate their sub items.

Resources