Chart is not visible in Parameter Variation Experiment page in AnyLogic - simulation

I created the parameter variation experiment to observe the changes in model outcome by changing specific parameter "ContactRateInfectious" values. Once I set the parameter values and Create default UI, no chart appeared. The image of my experiment page is given below.
I was expecting to see a chart that looked like this:
Let me know how can I achieve this.
Thank you.

You open the AnyLogic example models
You search for "Parameter Variation"
You open the first model you find (hint: it is called "Bass diffusion")
You copy the chart over
You figure out how they fill the chart from the model runs (see the Param-Var experiment properties in the example model)
You adapt it to your model
Done :)

Related

PyQGIS: change expression for datadefined symbology

I have a QGIS project that displays calculation results on a map. There are several vector layers, each with >100 calculated fields. The way the data should be visualised is very similar for all these layers/fields. I try to write a script that duplicates a template layer, and changes the expressions for the symbology according to the selected fieldname.
Below is a screenshot of the properties I try to access (if I were to change them using the UI).
How do I access/change the expressions of the line width and line offset of a graduated symbology in PyQGIS?
In case someone else runs into this issue.
I solved it using a workaround. I saved the style of the source layer to a qml-file, for the duplicated layers I create a temporary copy of the qml-file, do a search-and-replace on the qml-file and apply this to the new layer using
newLayer.loadNamedStyle(pathToTheTempQmlFile)
Hope this helps:
rule=layer.renderer().rootRule().children()[0]
rule.setFilterExpression('whatever')
see:
QgsRuleBasedRenderer.Rule

How do you use ECharts' formatter to specify international number formats?

I'm building an API to create ECharts configs and would like the data labels to appear in the correct format based on where the end user is reading the chart from.
For example, if a number in a chart is 10,000 I would like it to appear as 10,000 in North America and 10.000 in Europe.
It looks like it's not possible to set a global format in ECharts, so I will need to use the formatter option. I thought this would be as simple as passing in a function that uses JavaScript's toLocaleString() or Intl.NumberFormat, but the ECharts docs make this look much more complicated.
I haven't found any examples of formatter that show both the inputs and outputs for common formatting scenarios, so I'm hoping to get some help in understanding the right way to do this.
Below is a very simple example of the function I'm hoping to include in formatter, but this particular example doesn't work.
formatter: function(d){
return d.toLocaleString()
}
Answering my own question so someone who needs this info can find it in the future. It turned out to be very simple, but I couldn't find a simple example like this anywhere!
Because ECharts was already displaying a value as a default label on my chart, I assumed that any function I included in formatter would use that value (that's the assumption in the simple function in my question).
I learned that when you add a function to formatter, it doesn't use the default value automatically. You need to pass in a specific reference to a piece of data using their params dataset.
In my example, I needed to use params.value to access the data I needed. My series dataset also includes both x and y columns in an array, so I needed to reference only one of the columns to get the labels to work.
params is detailed in the ECharts docs, but in the series type sections, it wasn't clear (at least to me) how to use it.
Here's what a simplified version of my working function looks like:
formatter: function(params){
let label = params.value[1] // this is my y column
return label.toLocaleString()
}

Autodesk forge highlight child object

Recently i've been working on this repository https://github.com/xiaodongliang/forgeviewer_embed_in_powerbi_report to build a custom visual in Power BI to visualize the issues extracted from Bim track'S API.
The idea was visualizing them in associaton to the model's ROOMS.
In order to do that I worked with a NWC file, so i cuold export rooms as a geometry.
What i would like to do now is to highligt the rooms if a connected issue is selected from a table.
The problem is When i select an issue from a table, in the selection tree i can see highlighted the parent object name (ROOM) instead of the child (solid), and i think that is why i can't achieve my purpose (if not please correct me).
what i have
what i wold like to do
Does anyone know a way to do that?
If you would like to change your selection between (FIRST_OBJECT, LAST_OBJECT, LEAF_OBJECT) you can change viewer selection settings in order to test:
If you would like to achieve this programmatically :
Viewer.setSelectionMode();
could help you as well.
If I well understood, you want to highlight the child (which contain the mesh) instead of the parent.
The object highlight (isolate) is done in /forgePowerbiView/src/visual.ts with this code:
const dbIds = options.dataViews[0].table.rows.map(r =>
<number>r[0].valueOf());
console.log('dbIds: ' +dbIds)
this.forge_viewer.showAll();
this.forge_viewer.impl.setGhostingBrightness(true); //for isolate effect
this.forge_viewer.isolate(dbIds);
Take a look at this link Enumerating leaf nodes on Viewer. This will help you to get the dbIds you want to isolate.

Adding and removing Measures dynamically in sapui5 VizFrame

I would like to change Measures dynamically in my VizFrame like in ChartDemo App from sapui5 docs [link below].
https://sapui5.netweaver.ondemand.com/test-resources/sap/viz/demokit/chartdemo/index.html
So when I click to one of my five checkboxes the proper Measure will be added or removed in case of unchecking.
I have one json from which I get data.
I've tried with this code:
if(oCheckBox.getSelected()){
oVizFrame.removeFeed(feedValuesAxis);
feedValuesAxis.setValues("ValueFromJSON");
oVizFrame.addFeed(feedValuesAxis);
}
But it causes error:
[50005] - valueAxis : does not meet the minimum or maximum number of
feeds definition.
I am using SAP UI5 version 1.28.
I have one VizFrame, one Dataset with all Measures and two FeedItem one for values and one for Dimension.
I guess I have to create a binding, right? But how should I do it? Thanks a lot for any pieces of advice.
Simply, I have missed array when putting value into setValues() method.
So the answer is:
feedValuesAxis.setValues(["ValueFromJSON"]);

How to change the SSRS input parameters position in report

My SSRS report contains 7 input parameters and while running my report the size of the parameter(i.e. length) is increasing.
One of my input parameter(drop down list) may contain 100 characters so the size is not constant but i want to place all parameters in 2 lines or 3 lines(in a row).
Now it is coming 2 parameters per a row
Please advice
As gbn indicates, it's not easy to change the built in report server method of presenting the parameters. SSRS likes to always use two parameters per line, presented in the order that they exist in the report (which must match the dependency order.)
So the alternatives that gbn mentions: Both involve building a "Wrapper" application: some custom code or a web page that you can code however you like to get the parameters. Then you call Reporting Services, either in code or by passing a formatted URL with your parameters. The report can be displayed in a frame, new window, or passed as a stream to where ever you'd like.
The URL access is pretty straightforward and reliable: I often use it either by hand (to create "favorites") or in code.
http://msdn.microsoft.com/en-us/library/ms153586.aspx
For what you are looking for, these might be more work than you expected, but they will be extremely flexible for your interface.
Jamie
You can certainly do that, just right click on the RDL file in the solution explorer and select view code. then move the XML tags named <ReportParameter Name="Nameofparameter"> under <ReportParameters> according to where ever you want to position. And then save it. thats it!!!
The report parameters are kind of floating in values of 2, so if u have 4 report parameters then it will be shown as 1,2 next line 3,4. Best of luck!!
Use ASP.NET for the paramaters and a ReportViewer control or URL access to render. Seriously.
I don't know of any option to present parameters any way other then the default
I believe you could try using jQuery. The report parameters are rendered in a table under a div tag with class sqlrv-ParameterContainer. Write a jQuery or JavaScript function that will extract the full innerHTML from this div ie. the table content and then extract the table row information like the <label> or <input> tags.
Create your desired table structure with <table><tr><td>{extracted sections}</td><td></td></tr></table> or leave it to your requirement...
Then just append this new HTML structure in place of the original default structure.
In jQuery it will be like
$(".sqlrv-ParameterContainer").html();
which will give you the entire table structure that comes inside the parameter. Use XML parsing and get the input controls and all. Extract these controls as-is, don't change anything.
$(".sqlrv-ParameterContainer table").remove(); // it will remove the SSRS rendered default table from DOM
$(".sqlrv-ParameterContainer table").appendChild('<table><tr>......</tr></table>'); // Append your custom html structure here....
This was something that came to my mind quickly... I would suggest you test it... :)
This doesn't help the OP with SSRS-2008 but in case it helps others - Microsoft have improved this in SSRS 2016 - parameters can now be easily managed via the GUI in Report Builder / Visual studio:
https://www.intertech.com/ssrs-parameters-2016-update/