Controlling the display range in a history' chart in the BCG library - charts

I am asking to the StackOverflow for the first time.
If I rude to you, Tell me it. I will fix it.
Thank you.
Asking...
In the BCG Library. Using Visual Studio 2012, MFC.
I want to control the display of data range in the chart of historical.
When I call below functions.
CBCGPChartAxis::SetFixedMaximumDisplayValue
CBCGPChartAxis::SetFixedMinimumDisplayValue
CBCGPChartAxis::SetScrollRange
CBCGPChartAxis::EnableScroll
CBCGPChartAxis::EnableZoom
CBCGPChartAxis::SetAlwaysShowScrollBar
The chart just worked once.
And then, The chart seemed calling CBCGPChartAxis::SetAutoDisplayRange() automatically.
In other words. I don't want to call CBCGPChartAxis::SetAutoDisplayRange() automatically by the chart.
controlling the display range in a history' chart.

As far as I can see in the source code this function is called from serveral places. Maybe the easiest method to block this function is to call CBCGPChartSeries::ReplaceAxis and replace the automatically created axis with you implementation, that may ignore SetAutoDisplayRange.
If this doesn't help or as a method for further investigation:
Set a breakpoint and look into the callstack to see who calls this function and when this function is called. Again: As far as I understand the source code the function is called automatically when something changes in the chart.

CBCGPChartAxis* pXAxis=***;
pXAxis->EnableScroll();
pXAxis->EnableZoom();
pXAxis->ShowScrollBar();
pXAxis->SetFixedUnitCount(20,1);
20 means the totle number of V grid line in every visible range and 1 menas there is one point in a single range of every grid.
Might be your wanna.

Related

How to mix bar and lines in Grafana in one chart

How can I display one dataseries as bar and another as a line in one graph like it is used in the last comment of: see last picture
Short answer:
It's not possible (yet) using the Grafana UI, only by hand.
Long answer:
As far as I know there is no way of doing this using the UI switches; you'll have to use the use the "alias or regex" fields below the visualisation configuration.
Prepare your data
Before you start, make sure that your queries A and B retrieve actual data. You won't see your data otherwise and be confused why they're not showing.
Adding fields and values to the aliases
Once you are selecting the correct data you want to display, just add the following on the visualisation section of the graph at the 'alias or regex' fields:
Add 2 overrides, one for each value you want to display using the 'Add series override' button.
Add a "Bars:false" option flag and a "Lines:true" for the value you want as a line.
Be sure to use the exact opposite values for your bars ("Bars:true" & "Lines:false")
Add a 'Y-axis: 2' to the value you want to have on the right side of your graph.
Optionally, you can add a "Z-index: 3" for the value that you want to have on top (I added this option to the line to make sure it's always drawing on top of the bars).
Enjoy
You should now have a nice graph with 2 types of data and visualisations in one; something like this:
For those who were asking in the comment section, yes this isn't available in version 8, however, you can still change the time series visualization to graph(old) so you can set the alias/regex.

Masks: Setting "MaskValues" parameter failling on matlab 2014b

I am currently working with a bunch of code using matlab programatically controlled masks.
I just ran into a new problem, which I did not experience before.
I have to change a checkbox state in the mask, I am basically doing the following:
maskNames = get_param(gcb, 'MaskNames');
maskValues = get_param(gcb, 'MaskValues');
// search in maskNames for the checkbox
// change the corresponding index in maskValues (from "on" to "off" in this case)
set_param(gcb, 'MaskValues', maskValues);
For some reason, this is not working under matlab 2014b. The checkbox remains checked, and if I perform a "get_param('MaskValues')" I can see the value is still to "on".
This works on Matlab2011b (same code, no version branches).
However, if I do a simple : set_param(gcb, 'ParameterName', 'off'), then it works. However I cannot really do this as there could be multiple checkbox to change at once and we are using the MaskNames cell search in order to determine which mask component should be modified.
What I do not get, is that I already work on masked blocks and we are using the exact same framework to communicate with them. So basically on other blocks on which I am setting popups, it is working on matlab 2014b.
So I'd like to have an insight of what could cause this problem and how to solve it, because basically I am in a situation where I cannot guarantee that the other chunks of code and other existing blocks using this technique will continue to work or are not even already broken.
Thank you guys

Change line behavior of a combined chart in SAPUI5 VizFrame

I am using a combined chart (Stacked Column + Line) for my application. Is it possible to change the line plotting?. (somewhat like shown in RED in the image). If yes then how is it possible?
I'm sure you already know the VIZ documentation where you can find all possible properties of VizFrame. As far as I know there currently is no way to get the behavior you're asking for except for writing your own lineRenderer (vizProperties.plotArea.lineRenderer). There is one alternative line plotting mode available which is smoothening it but I'm sure thats not what you want.
However you could use a second series of column chart instead. Just use a standard column chart and add two data series instead of one. I think this would show the exact information you're trying to get with the current diagram just no connection between them.

dc.js chart.select function

I am new to dc.js. And I refer to the API Reference and see the chart.select function. But I do not know how to use it.
Such as I have a piechart and I want to have the value and percentage showing in the div below the chart. Could some one tell me if this can be realized using chart.select?
chart.select is for selecting some elements in the d3 or CSS selector sense, if you want to apply some attributes. It probably won't help you directly.
What you are probably looking for is the filtered event, which will tell you when items have been selected. Then you can read the filters and display them elsewhere like so:
chart.on('filtered.some_id', function() {
d3.select('#your-div').text(chart.filters().join(','));
});
(There are also ways to respond directly to interaction events, but I think this is more to the point for what you're trying to do.)

add shape dynamically to activereports

I've got a kinda requirement in which there is a kinda graph (static picture) on a page. In that picture I need to plot some points dynamically. That means using a shape filled with blue color. The number of points is floating depending upon the number of applicants choosen. How can I make it work or how can I add new elements to report at runtime. Am working in ASP.nET using VB and the AR version is 6.2
If I have understood your query right,then you want to plot some points depending on the dynamic data.
A suggestion would be to make use of Chart control in report. The chart can be bound to anything from a list to an array and the data can be changed dynamically from time to time.
Moreover,you can set the backcolor and other properties of the Chart control to give a look and feel of your choice.
Regards,
Mohita
Sorry if my question makes any confusion.. Actually I was able to make that. So am just sharing that code if it helpful for someone else.. I put this to the report start event. (We are not permitted to make this in details event)
Dim pic As New DataDynamics.ActiveReports.Picture
pic.Image = System.Drawing.Image.FromFile(HttpContext.Current.Server.MapPath(String.Format("~/images/circle.gif", cl)))
pic.SizeMode = SizeModes.Zoom
Detail1.Controls.Add(pic)