Beginner in Core Plot,I'm trying to plot real time graph using core plot where the data comes every 0.3 second and I am plotting for about 1 hour duration. Now every time when the reload data method is called does core plot start plotting the graph all over or only the newly appended point in the datasource is considered?What I am targeting is only the newly appended point to be reloaded to be plotted on the plot and the rest points in datasource already plotted without reloading.
You have several options for updating the plot data:
-reloadData: Queries the datasource for all of the data points.
-insertDataAtIndex:numberOfRecords:: Insert records into the plot data cache at the given index. The datasource is only queried for the new data. Use a starting index equal to the old data count to append records to the end of the existing data set.
-reloadDataInIndexRange:: Refresh only the data points in the given range.
-deleteDataInIndexRange:: Removes existing data int the given range.
Related
My goal is to render time-series data from set locations on a map. Essentially, I have about 30 predefined (static) locations in Switzerland from which I will be receiving real-time data. The data itself is relatively simple, just the signal/noise ratio of the signal we're receiving, which should be updated every few seconds or every minute. I am using InfluxDB as my database. Are there any specific setups I should be using for this kind of visualization?
My first question is: is it best to use the worldmap panel or the geomap panel at this time? I seem to be finding more information/documentation on the worldmap panel even though i have also read that geomap is (or at least will be) its replacement.
Second, I assume that since I'm using time-series data, that I should be using the Time-Series format, and not the Table format. However, I have not been able to render any data points using the time-series feature, even by following the simplest of examples in your documentation. The best I can do is use the Table feature, and internally remove previous points from my database at every iteration (so that multiple points aren't rendered at the same time for each location). Here are two screenshots of when I'm able to render data on the geomap using the Table format, and then after switching to Time-Series format that the points are no longer there (note that I have the same problem with the Worldmap application as well).
I'm able to render data using the Table method:
...but not using time series:
Thanks for any help!
For rendering timeseries data on the geomap, you must convert your lat/long fields to a single geohash field. You'll have to do that prior to inserting the lat/longs into influxDB
See this answer
I'd like to create a highchart line chart with drill down to addition data.
The first data point would be date and total count, i.e., (2019-04-01, 3,000)- I have that part down and displaying.
The drilldown would be a break down of the total, such as:
Cats 1,000
Dogs 1,000
Pigs 1,000
I can do that too, but only when I can predict the drilldown series. The data set is dynamic, it could, for example, sometimes include birds and fish, or not have pigs.
I've create a pie chart with drilldown and set an array to have the drilldown data... I could pull this off because the data was predictable. I'm using PHP to create the data set but could use python or csv is that makes it feasible.
The drilldown should be dynamic and be able to handle any introduced series.
With the graph explorer & excel API I was able to get the used range of a worksheet with following endpoint:
https://graph.microsoft.com/v1.0/me/drive/items/{drive-item-id}/workbook/worksheets('Sheet1')/usedRange
However, the request returns a json full of formulas instead of the values calculated from those formulas that appear in the cell when opening the workbook in excel.
Is there a way to get Microsoft Graph to calculate my workbook instead of returning formulas when fetching ranges or cells?
You could use values or text property of range object to get to computed values. text is what the users would see after applying number format (non trimmed version).
If your workbook is in manual mode and you like to calculate after updating the formula, you could run the calculate API against the workbook.
POST /me/drive/items/{id}/workbook/application/calculate
Body is optional. If you wish you could use below calculation options.
{
"calculationType" : "{calculationType}"
}
{calculationType} specifies the calculation type to use. Possible values are: Recalculate Default-option. Performs normal calculation by calculating all the formulas in the workbook,Full Forces a full calculation of the data, FullRebuild Forces a full calculation of the data and rebuilds the dependencies.
I need to update the most recent candle in my chart. Typically, I would use this to update a point:
//javascript
chart.series[0].data[n].update({...});
However, my series.data array is empty when I show the entire data set possibly because of:
Official HighStock Documentation: data
Read only. An array with the series' data point objects. In case the series data length exceeds the cropThreshold, or if the data is grouped, series.data doesn't contain all the points. It only contains the points that have been created on demand. In these cases, all original X and Y values can be read from series.xData and series.yData. Additionally, series.options.data contains all configuration objects for the points, whether they be numbers, arrays or objects.
Returns Array
How can I update my most recent candle point when the interface to the Point.update method is only accessible via the series.data collection? When my series.data array is empty do I just overwrite the point properties via series.options.data?
I've also considered invoking the series.update(options) method, but I may need to perform a candle update many times as a result of real time activity. Therefore, an update on the entire series object would not be a good decision because of overhead.
The data array is empty because Highstock does data grouping - when enabled it uses groupedData array instead. Unfortunately, you cannot update a grouped point (Highcharts throws the error).
What you can do, is disabling data grouping, then you will get a data array and point.update is possible or use Series.removePoint and Series.addPoint()
chart.series[0].removePoint([chart.series[0].groupedData.length - 1]);
chart.series[0].addPoint([
Date.UTC(2016, 11, 8),
115,
2,
30,
20
]);
example: http://jsfiddle.net/0z95x58t/
I'm using [thePlot5 insertDataAtIndex:i numberOfRecords:150]; for inserting data into the real time graph.The graph contains almost 10000 data points(i need 10000 points in that graph).
But i'm updating 150 data points every time.
But -(NSUInteger)numberOfRecordsForPlot:(CPTPlot *)plot method returns 10000 every time. so that iteration in -(double)doubleForPlot:(CPTPlot *)plot field:(NSUInteger)fieldEnum recordIndex:(NSUInteger)idx will be 20000 thousand times for together x and y.This reduces performance.
I just want to update only the new points(i.e. 150 points not entire 10000 points).Please help me guys.
The -insertDataAtIndex:numberOfRecords: method tells the plot to load only the new data points. In the example given in the question, the plot should ask the datasource for 150 new points, starting at data index i. Note that after the insert call, -numberOfRecordsForPlot: should return the old value plus the number of new records (10000 + 150 = 10150). If you want to keep the total number of points constant, you'll need to remove some old points with -deleteDataInIndexRange:.