setDataCleaningThreshold for Area Range Series - lightningchart

I saw in version 3.00 there is something called setDataCleaningThreshold , Can you tell its benefits , I think it's for faster loading of progressive charts.
const dcThreshold = xVal - 100;
lineSeries.setDataCleaningThreshold(dcThreshold);
AreaRangeSeries.setDataCleaningThreshold(dcThreshold); // not working
But it's not working for Area range series.
Also there is setMaxPointCount in Area range Series , what is the difference between both ?
My charts are progressive and I want to clear the charts that are out of view and make the charts faster.What is the best way ? Can I use Dispose method ?
Also , can we drag the chart by left click + mouse drag. . I saw something like API for Axis mouse and touch events is released.Can you tell what can be achieved with this.
(right now its right click + drag).

it's not working for Area range series.
setDataCleaningThreshold is new API that will be slowly introduced to existing series. With v3.0 it is only introduced for LineSeries and its derivatives (like PointLineSeries).
To prevent confusion, please refer to official API documentation to see if some method is supported - for example if we look at AreaSeries, it is not part of the API.
Also there is setMaxPointCount in Area range Series , what is the
difference between both ?
setMaxPointCount and setDataCleaningThreshold exist for the same purpose, and effectively achieve the same things, but they are based on slightly different ideas.
setMaxPointCount configures automatic data cleaning by specifying amount of data points to retain at the "head" of data.
setDataCleaningThreshold configures automatic data cleaning by specifying a coordinate on progressive axis. All data points that are "behind" this coordinate can be cleaned whenever convenient. This configuration is slightly preferred over "max points count" as it is more convenient for the rendering engine, and it also behaves slightly more logically - if you apply the fit() operation by dragging to top-left in chartXY with left mouse click, the axis will stop at data cleaning threshold, instead of showing all data including the data behind cleaning threshold.
Both of these methods will be supported for the time being and there should not be major differences between using either, so I recommend use whichever you feel more comfortable with.
Eventually the data cleaning configuration will settle down to a simpler API, but now we're still feeling how different users are using the library, and how we can optimize the performance best - so the API is a bit messy (as in, there are 2 methods for same purpose).
My charts are progressive and I want to clear the charts that are out
of view and make the charts faster.What is the best way ?
For AreaSeries setMaxPointCount is the only automatic option.
Please see the updated documentation on the method to learn more.
You can also implement manual data cleaning using dispose method, as you suggested.
However, please see if automatic data cleaning works for you first.

Related

Application Insights Dashboard - Set Graph Dimensions?

I am currenty setting up a new dashboard in application insights to monitor our applications in detail. To do so, I am logging custom events from my application, and using a log query, I generate a Stacked Column Chart. Like so:
Chart. Notice that I am grouping on multiple dimensions, and the generated chart lets me pick which Dimension I want. (As documented here: https://learn.microsoft.com/en-us/azure/azure-monitor/log-query/charts#multiple-dimensions)
Now, when I pin this chart to my dashboard, I lose the ability to pick the dimension I want to see there. (Dashboard chart) Is there some way to retain this, or do I have to create and pin multiple charts, one for each dimension?
You are right. Changing the dimensions of existing parts are not supported yet.
We plan to support this in the future.
I'll ask here once we add this support.

How to do Grafana Dynamic Singlestat Panels?

I've got metrics in Graphite showing response time for various organizations. The list of organizations can change on the fly. I want panels in Grafana to appear for any origanization who's response time is over a certain threshold. Was thinking the Singlestat panels was the right panel to use. Question is how to make them appear dynamically? Is a scripted dashboard the right approach?
If a scripted dashboard is the correct solution, can anyone recommend a Grafana cloud/service provider that supports scripted dashboards? The current one I have been testing out does not support scripts. Note that I am not really tied to Graphite as the backend since this project is in proof of concept phase. Just need the backend to also be a service. Don't want to roll the backend myself. Thanks.
As far as I know, it is not possible right now.
We had a similar use case in my organisation, and here is what we did.
You can define a template variable for your organizations, and then use SingleStat panel with “Repeat Panel” on this variable, but that will display panels for all of your organizations. Filtering based on a criteria is a requested feature.
Alternatively, you can use the Table panel for your use case.
Choose Table panel
In “Metrics”, enter your metric organizations.*.response_time (or whatever more complicated you need, applyByNode can be handy for such cases)
In “Options”
“To Table Transform”: choose “Time Series aggregations”
“Columns”: Avg, or Current (depending on your needs)
“Coloring”: use thresholds to paint in red or something anything above your desired response-time threshold.
Sort the Table per the Number column.
Ta-da! Your organisations needing attention will be at the top of the table and highlighted.
In the lack of true filtering, this worked for us. Hope it will work for you too :)

Calculating a Web Audio API filter's response at a specific frequency and Q-factor

I'm using the Web Audio API to make a graphic EQ with four BiQuad filters; a highpass, two bandpass and a low pass:
You can see each node representing each filter's frequency. It's working nicely but I'd like to draw the shape of the filter's roll-off you'd usually find in other graphic EQ's.
I have the Q-factor of each filter and the central frequency. What I would like to do is get a formula that allows me to get the frequency of the roll-off at a specific db value. For example what is the frequency of the roll-off at -200db?
It's been a while since I've done any heavy mathematical stuff and so any help would be greatly appreciated.
Have you looked at the getFrequencyResponse method of BiquadFilterNode? https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#Methods.
This demo from my IO2012 Web Audio talk uses it: http://webaudio-io2012.appspot.com/frames/frequency-response.html. You'll have to calculate the responses of multiple filters stacked together from there, of course.

How to detect on client side if FusionMap tiles cached and ready to be displayed?

My webpage displays runtime generated FusionTables data on a Google Map.
The problem is: when you create a FusionTable with geometry type column and display it for the first time, Google has to load all related map tiles in its server side cache. This takes a while - sometimes 2-3 sec, sometimes 15 -20 sec.
During caching, the map should display a grey overlay saying "Data may still be loading...". I'd like to avoid this screen, because it's very buggy. Sometimes the overlay is displayed, sometimes not.
I'm looking for a way to detect if all map tiles cached so that i can display the map to the user.
I already tried to refresh the map tiles periodically, but this will give me no feedback when to stop refreshing:
$("img[src*='googleapis']").each(function(){
$(this).attr("src",$(this).attr("src")+"&"+(new Date()).getTime());
});
For this reason I'm looking for other solutions.
Try simplifying your geographic data. The message appears when the server-side process misses a deadline for serving the map tile in a reasonable time. By reducing the complexity of the polygons, you're much more likely to not see the "Data may still be loading...." message tiles.
You can reduce the complexity in two ways: reduce the number of vertices (points) that define the polygons, and reduce the precision of the lat/long locations.
Please also note as an FYI that as the exact same map gets called again and again by different viewers, the process results are cached server-side and the message becomes much less likely to appear, and then usually due to public cacheing.
-Rebecca
Answering my own question: simply there's no way to do it as of now.
As a sidenote: I'd never advise anyone to think about using FusionTables to display dynamically generated geographic data. It's not designed that way. Only use FT if you have a somewhat static dataset that changes rarely.

How to modify weather information displayed on google map

I have created a google map displaying markers and the weather layer using Google Maps API V3.
The weather layer is great for displaying weather information at well-known locations; however, for my map I only care about the wind speed rather than the forecast (ex. sunny, rainy, etc). Is there any way to modify the weather layer so that it displays "wind: s 5m/s" directly on the map instead of the sun/rain icon?
I realize that you can click on the icon to get the wind information but given that we do not care about the actual weather, we do not want people to have to click to get that. Instead we want the wind displayed directly.
(If it is not possible, then any alternative suggestions would be greatly appreciated as well :) )
I made a Weather API available on mashape, and they have a ready to use simple PHP SDK.
This api is really simple to use because we use the cool standards that are available nowadays, like JSON and REST.
If you like it please give it a try on mashape
I've tried but haven't found a way to change how the weather icons look when they are loaded.
It is possible (as you may know) to create a custom overlay using discrete weather data items (like wind speed) when a weather icon is clicked but that wouldn't seem to solve your problem.
See" "google.maps.weather.WeatherConditions object specification" in the V3 API reference
Like many of these kinds of things, I imagine it is theoretically possible to scan the DOM, find the weather 'markers', extract the info you want and redraw them as you wish them to look, but you may (unsure about this) find that the weather icons are actually images and data like wind speed doesn't actually exist in the DOM until the weather icon is clicked: The discrete data may be the product of an ajax load in response to the click event. Even if you got a DOM crawler to work it could be broken by a new release of the API and you'd never know what hit you.
Best bet may be to submit a change request to the API developers asking for the ability to format the weather icons and specify their content.
or
Use some other online source of json or xml weather data and create your own weather markers, labels, or whatever on your map.
Sorry I can't provide a more constructive answer :-(

Resources