Control a SciChart scrollbar manually - scichart

I'm attempting to make a custom overview with pan/zoom scroll bar. The problem is, the data in the chart is not the total viewable amount of data (which I have stored in my own buffers) so I need to control the drawing manually. I have this working using textboxes, I have a start point and an end point which causes my primary chart surface to zoom out to the range specified from my buffers.
Now I need to bind these integer properties to the grips of the scroll bar, but it seems if you don't bind them to the chart's axis they send you to a break mode. I don't want the scroll bar directly bound to an axis on the chart, is this not possible?

Related

Microstrategy - Bar Chart in a Document does not show all the series

I have a bar chart in a document.
Each bar is a value of an attribute, but sadly the chart shows at most 5 columns.
I cannot find an option, in the web or the desktop, for showing 1 bar for every value in the attribute.
How can I do it?
Run the report so that it produces a graph.
Go to Graph > Graph options > Options > General.
In the second section, Scrolling, increase the maximum number of series.

Report Builder can StripLines render on top of chart data?

can horizontal striplines on a column chart render on top of the data? My chart is rendering like this;
but I want the stripLine to be visible over the top of the data columns not below it. I am able to put the dataPoint text that you can see on top, even though i'd rather it be able to render to the right of the bar, but that doesn't seem to be possible either. any help would be great. Seems like some of these things would be pretty straight forward functionality for such a dynamic report builder but im also a layman.
Striplines are always in the background.
I would add a new Series to the Chart, and change the Chart Type to Line. For the value I would point at a Goal column in the datasource. If none is available you can use an expression or hard-code the value.
The sequence of the series controls which is infront of the other. You can drag the series around to reorder them.
My suggestion would be to increase the transparency of the color of the columns. click on chart, click on custom palette color in Properties on the right hand-side and specify level of transparency in the color's options.
P.S. I had the same issue and that's how I solved it.
Contrary to what I am reading here, it is possible to have the stripe lines on the front as well. However, you will need to create another Series specify the top and bottom value dynamically, and adjust the PointWidth to lets say 0.8 or something along those lines.
Alternatively, you can add in a bar graph with a line graph, that should do it as well.

How can I determine which items in a GridView that are visible in the current scroll window?

I have a GridView in my main app page and I want to do some background processing for the items that are currently in view for the user (high priority), and then of course do the other items too (low priority).
I can access the ScrollBar and the ScrollViewer, but none of them appear to tell me which of my items are in the current scroll window. I could try to hack this in, but it gets tricky because the number of row/columns change based on the size of the scroll region.
http://msdn.microsoft.com/en-us/library/windows/apps/br209745.aspx
http://msdn.microsoft.com/en-us/library/windows/apps/windows.ui.xaml.controls.scrollviewer.aspx
Any help much appreciated!
thanks
There are two general ways you can do this. The first is to get the GridViewItem's AutomationPeer, which actually has a direct method to call. Class information here. I've had problems getting this to actually be usable though. Luckily, there's a second answer. It will require some math to be done, but it's doable.
Get the item container, in this case a GridViewItem, using the GridView's ItemContainerGenerator.
Get the GridView's ScrollViewer. You can search for FindVisualChild<T> methods, there are plenty around.
Do MyGridViewItem.TransformToVisual(MyGridViewScrollViewer).TransformPoint(new Point(0, 0)); This will get you the top left corner of the item, relative to the entire scrollable panel (known as its Extent) of the ScrollViewer (this will be important later).
This will return to you a Point object.
Next, we'll need to find out the range of X values that are currently being displayed in the ScrollViewer.
Note: If you're using a Vertical scrolling ScrollViewer, use the Heights. Horizontal, use the Widths. Both, use both. I am going to do my example using the Horizontal/Width.
Take the HorizontalOffset. This is your current 'lower bound' for the current viewable region.
Take the HorizontalOffset plus the ViewportWidth. This is the upper bound of the current viewable region.
If your Point.X is greater than your lower bound and less than your upper bound, then the item is visible.
If you further need to find out if the whole item is visible, do
this same calculation for Point.X + GridViewItem.Width.
Hope this helps, and happy coding!
You can use VisualTreeHelper to scan the visual tree as Nate suggests, but this is usually not recommended at runtime, especially for tight loops (e.g. checking lots of GridViewItem objects) or complex visual trees. You could do a minor improvement and only calculate the position of these items once and then do a simplified check based on the ScrollViewer.ViewChanged event and offset values, but that still seems a bit too complicated.
If your GridView uses an ItemsPanel that supports virtualization (e.g. the default WrapGrid) - most of the items that are actually loaded into GridView items are actually visible or not far off the screen, so if you bind your GridView to a collection of view models using ItemsSource - you can figure out when these items are accessed by binding to their properties or handling Loaded/Unloaded events on the ItemTemplate and call back to the view models to know when they are getting accessed. That way you can start loading these items when they first start showing up on screen and leave the logic to determine whether they should be loaded to the list control virtualization implementation in the platform.

How to change time scale with mouse drag in SSRS

IN SSRS2008:
I draw a chart that has time in x-axis.
I need my chart has ability that when i click on portion of chart or select portion of x-axis
of chart by drag and drop my chart zoom to selected portion of time.
zoom in ssrs by default acts as picture zoom.but I need to zoom to specified portion of time.
anyone know how can i do it?
SSRS out of the box does not allow you to select a portion of a chart and zoom to greater detail. Your options are to either add a parameter to your report that allows the user to change the period of time to display on the x-axis or to add an action that allows the user to click on a data point in your chart and jump to another report with greater detail. This jump to report action could even jump to the same report but whether it's the same or different, you can pass in what the user clicked on as a parameter value that drives the level of detail in the new report. See this for more information on adding drillthrough to your report: http://msdn.microsoft.com/en-us/library/ms159847(v=sql.100).aspx.

restore deleted y-axis

Is there a way to add the y-axis back to a bar chart if it has been deleted? Right now, all I have found to do is create a new chart and set it up again like my other chart, just not deleting the y-axis. :/ I'm using Report Builder 2.0.
Figured it out. Select the chart then, in the Properties pane under Chart, hit the '...' button next to ChartAreas (Collection). That brings up a ChartArea Collection Editor window. Under Axes in the right column, hit the '...' button next to CategoryAxes. That brings up a ChartAxis Collection Editor window. Under Appearance, toggle Visible to True.