nrtdp / scichartblazor Goto Github PK
View Code? Open in Web Editor NEWA Blazor wrapper for SciChart JS
License: MIT License
A Blazor wrapper for SciChart JS
License: MIT License
Hello! Thank's a lot for this project!
I was trying to add multiple axis on a chart in a cycle like this:
` for (int i = 0; i < _seriesCount; i++)
{
var YAxis = new NumericAxis()
{
Id = $"Y{i}",
MaxAutoTicks = 5,
DrawMajorGridLines = false,
VisibleRange = new SciChartNumberRange(-100.0, 100.0),
VisibleRangeLimit = new SciChartNumberRange(-1000.0, 1000.0),
IsVisible = (i == 0)
};
await _chartBuilder.AddAxis(YAxis, AxisType.Y);
var XAxis = new NumericAxis()
{
Id = $"X{i}",
MaxAutoTicks = 5,
DrawMajorGridLines = false,
GrowBy = new SciChartNumberRange(0, 0.2),
VisibleRange = new SciChartNumberRange(-1000.0, 1000.0),
VisibleRangeLimit = new SciChartNumberRange(-1000.0, 1000.0),
IsVisible = (i == 0)
};
await _chartBuilder.AddAxis(XAxis, AxisType.X);
} `
But it ended with error
Error from chart in div Ced51579e-26cc-4536-96e2-49f46254f9db: TypeError: Cannot read properties of undefined (reading 'min') at ExtremeResamplerHelper.resetAndFillBasicNativeArgs (ExtremeResamplerHelper.js:178:54) at ExtremeResamplerHelper.needsResampling (ExtremeResamplerHelper.js:50:18) at BaseRenderableSeries.needsResampling (BaseRenderableSeries.js:935:37) at SciChartRenderer.resampleSeries (SciChartRenderer.js:65:17) at SciChartRenderer.prepareSeriesRenderData (SciChartRenderer.js:328:57) at SciChartRenderer.render (SciChartRenderer.js:144:35) at SciChartSurface.doDrawingLoop (SciChartSurface.js:707:35) at SciChartSurface.onRenderSurfaceDraw (SciChartSurface.js:1337:18) at RenderSurface.onRenderTimeElapsed (RenderSurface.js:37:14) at Object.Draw (createMaster.js:294:60)
I looked closer to js code and found out that in this function
SciChartRenderer.prototype.prepareAxesRenderData = function () { var xAxesById = new Dictionary_1.Dictionary(); var yAxesById = new Dictionary_1.Dictionary(); // Prepare XAxes this.sciChartSurface.xAxes.asArray().forEach(function (xAxis) { xAxesById.add(xAxis.id, xAxis); xAxis.prepareRenderData(); }); // Prepare YAxes this.sciChartSurface.yAxes.asArray().forEach(function (yAxis) { yAxesById.add(yAxis.id, yAxis); yAxis.prepareRenderData(); }); return { xAxesById: xAxesById, yAxesById: yAxesById }; };
this.sciChartSurface.xAxes
has only last axe with last id.
I tried rewriting the wrapper and pass serialized list of axis. It works, but all Ids have default values, so the error doesn't go away.
Is it possible to add axes in different way or maybe fix something in existing method?
ScichartBlazor nuGet Package v1.0.0.0
Scichart v2.2.2415
Getting Below Error:
Sorry! This version of SciChart is too old to be trialed. Please update to the latest version
Looking for Licensing Wizard... Please run it or click for download and installation instructions.
Is there anything suspicious?
I noticed a big memory leak (probably not tied to this actual case, lot of charts and adding new/removing old) and then started to search for probable causes. My code previously used SciChartBuilder.Dispose()
, but I suspected it may not work as thought so I changed it to async version of it and now I will get errors.
My code:
public async void Dispose()
{
await _chartBuilder.DisposeAsync();
GC.SuppressFinalize(this);
}
Error:
Error: Could not find 'sciChartBlazorJson.unregister' ('unregister' was undefined).
at https://0.0.0.0/_framework/blazor.webview.js:1:328
at Array.forEach (<anonymous>)
at s.findFunction (https://0.0.0.0/_framework/blazor.webview.js:1:296)
at S (https://0.0.0.0/_framework/blazor.webview.js:1:2437)
at https://0.0.0.0/_framework/blazor.webview.js:1:3325
at new Promise (<anonymous>)
at beginInvokeJSFromDotNet (https://0.0.0.0/_framework/blazor.webview.js:1:3306) at https://0.0.0.0/_framework/blazor.webview.js:1:40711
at EventTarget.<anonymous> (<anonymous>:7:62)
at EmbeddedBrowserWebView.<anonymous> (<anonymous>:1:40673)
at Microsoft.JSInterop.JSRuntime.InvokeAsync[TValue](Int64 targetInstanceId, String identifier, Object[] args)
at Microsoft.JSInterop.JSRuntimeExtensions.InvokeVoidAsync(IJSRuntime jsRuntime, String identifier, Object[] args)
at SciChartBlazor.SciChartBuilder.DisposeAsync()
Any recommendations what to do/try? Create a new method inside javascript and use that and make PR?
I want to use "FlipCoordinates" Property to flip the Y-axis.
I believe that both ScichartJs and Wpf has this feature. Could someone please provide guidance on how to implement this within the wrapper? If feasible, could you also outline the high-level steps for integrating this functionality or wrapper has a function/property for this?
Can you please tell me is there a functionality called "PaletteProvider"(changes color of series on certain point range[Line chart]) in ScichartBlazor same as WPF?
I want to show x-axis coordinates as string (ex. Apple, Banana, Mango) instead of double in column chart and take y-axis as double value.
How can we achieve that? can you guide?
Hello, mainly in need of StokeDashArray property for FastLineRenderableSeries, but read from here https://www.scichart.com/documentation/js/current/webframe.html#Series%20Styling%20-%20Dash%20Line%20Patterns.html that "All the line-based series in SciChart.js support StrokeDashArray for dashed or dotted lines." So thought it will be useful for all, not only FastLineRenderableSeries.
I am creating .Net MAUI Blazor Hybrid Application (Window Application) and during development, I am using a trial version of sci chart js and setting up that version runtime key. It works fine on my machine and also on other machines.
Finally, I have purchased a scichart js license and set up the runtime key in the code.
In debug mode charts are visible in my machine but not in others due to one developer access which is correct!
But the strange thing is in release mode charts are not visible too... This cause an huge problem!! which is working in trial version. I have tested this in other machines also same thing happens.
Please review below error screenshot.
@mikehollas123 @andyb1979 @rfellers Is there anything wrong here? Can you please help me ASAP? This is on urgent basis.
After give values to VisibleRange for any axis, expect that first time chart view should be in that range which was given to VisibleRange.
But, this is not set the visible range even after update AutoRange to Never/Once.
Looks like something is override the values of VisibleRange.
Is there anything missed ??
When I try to zoom in/out using mouse, Chart not zoom in/out Y-axis even I set
XyDirection = XyDirection.XyDirection
and X-Axis is working properly.
Can you guide is there anything wrong or miss to set anything?
Hi guys!
Just a note / issue to test & update for scichart.js v3. When we have some bandwidth happy to help with that. It's been very busy here at SciChart though!
Amazing Blazor wrapper. Thank you for putting this out there. I have started playing with SciChart in a Blazor project but I am using TypeScript, albeit, I've not loaded the definitions file yet, so it is not taking advantages of the strongly typed system.
When I posted up a question on the SciChart forum, Andrew, the CEO pointed me to this repo and after quickly reviewing it today, I believe if I'm not mistaken, that it's missing a crucial feature that I've been able to achieve in TypeScript and that is to extend the CustomChartModifier2D. This allows me to draw on box annotations, lines and other shapes by mouse clicking on the chart ittself.
I can understand that this might not be a priority for most, but I was wondering, could you help point me in the direction of how to achieve this in your project and I'll create a PR for it if I can get it working.
Thanks
SciChart has possibility to enable and disable modifiers. This library would benefit this kind of possibility, because clearing and re-adding them all the time seems little bit too much.
Hello,
I am using the SciChartBlazor package in my MAUI Desktop Application. I want to display the Dynamic Tooltip Template in my Chart.
https://demo.scichart.com/javascript-chart-vertical-slice-modifier
How can we achieve that? can you guide?
Great package, thanks for putting this out there!
I would like to know if it is possible to implement the DataSeries.Update() method? It seems that this feature is missing, and this is unfortunate because it does not allow high speed functionality when displaying real time data.
I may be able to contribute to this project once I get more used to the source code, but right now I am looking for a quick fix, as I have a demo next week
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.