This is a known issue due to the way we detect if the axis is in its default state. We are taking a look to see if there is a simple and safe way we can sort out.
Regards
David
- David Burleigh answered 2 days ago
Any news on this?
- Daniel Trinidad answered 2 days ago
- last active 2 days ago
The FocusManager approach worked perfectly. Thank you.
- Jamie Agate answered 3 days ago
- last active 2 days ago
Hi Suzanne,
Firstly, we recommend providing code to reproduce this error. You can share this with us in a codepen, or a codesandbox. Instructions on how to do this can be found here: https://www.scichart.com/blog/codepen-codesandbox-and-jsfiddle-support-in-scichart-js
Next, we also recommend trying that same code to reproduce against the latest version of SciChart: v3.3. The version you are using (v3.0) is not the latest and could have bugs or issues in it.
We will await your update with code to reproduce before providing further assistance.
Best regards,
Andrew
- Andrew Burnett-Thompson answered 2 days ago
Hi Jamie,
Thanks for your inquiry.
This is the default behavior of WPF TextBox, which is used under the hood of our TextAnnotation.
We would suggest you try forcing Focus to any other control before saving the data. This can be done using WPF capabilities, for instance, FocusManager:
https://learn.microsoft.com/en-us/dotnet/api/system.windows.input.focusmanager.setfocusedelement?view=windowsdesktop-8.0
Alternatively, you can override the TextAnnotation Template to update it on a keypress:
https://learn.microsoft.com/en-us/dotnet/desktop/wpf/data/how-to-control-when-the-textbox-text-updates-the-source?view=netframeworkdesktop-4.8
Please let us know if you are interested in this option. We can share the default Template.
Kind regards,
Lex S., MSEE
SciChart Technical Support Engineer
- Lex answered 3 days ago
- last active 3 days ago
The background pattern in the Overview can be removed by how?
- jeong younghoon answered 5 days ago
- last active 4 days ago
Hi Jeong,
This can’t really be done like this. RenderableSeries are FrameworkElements and shouldn’t be declared in a ViewModel.
There are two ways to bind to RenderableSeries in SciChart WPF:
Method 1: declare RenderableSeries in XAML and bind to DataSeries in ViewModel
e.g.
<!-- where xmlns:s="http://schemas.abtsoftware.co.uk/scichart" -->
<s:SciChartSurface>
<s:SciChartSurface.RenderableSeries>
<s:FastLineRenderableSeries DataSeries="{Binding DataSeries}"
StrokeThickness="1" StrokeDashArray="2 2"
Stroke="OrangeRed"/>
</s:SciChartSurface.RenderableSeries>
<!-- XAxis, YAxis omitted for brevity -->
</s:SciChartSurface>
// Viewmodel
class ViewModel
{
public XyDataSeries DataSeries { get; set; }
}
With this method your number of RenderableSeries are fixed but you can modify the data from a view model.
Method 2: Declare RenderableSeriesViewModels in XAML and bind to SciChartSurface.RenderableSeries with the SeriesBinding Markup extension
e.g.
<!-- Declare a SciChartSurface with SeriesBinding -->
<!-- Where xmlns:s="http://schemas.abtsoftware.co.uk/scichart -->
<s:SciChartSurface RenderableSeries="{s:SeriesBinding RenderableSeriesViewModels}">
<!-- XAxis, YAxis omitted for brevity -->
</s:SciChartSurface>
private ObservableCollection<IRenderableSeriesViewModel> _renderSeriesViewModels;
public ObservableCollection<IRenderableSeriesViewModel> RenderableSeriesViewModels
{
get { return _renderSeriesViewModels; }
set
{
_renderSeriesViewModels = value;
OnPropertyChanged("RenderableSeriesViewModels");
}
}
With this method you have full control over adding, removing renderable series as well as modifying the data from the view model.
- Andrew Burnett-Thompson answered 1 week ago
The result screen is missing so I am uploading it.
- jeong younghoon answered 1 week ago
- last active 1 week ago
Hi Lex,
I follow the suggestion, set GrowBy to “0.0, 0.0”, and update my xaml code
<s:SciStockChart.XAxisStyle>
<Style TargetType="s:CategoryDateTimeAxis">
<Setter Property="FontSize" Value="{DynamicResource GlobalFontSize10}"/>
<Setter Property="DrawLabels" Value="True" />
<Setter Property="DrawMinorTicks" Value="False" />
<Setter Property="DrawMajorTicks" Value="False" />
<Setter Property="DrawMajorBands" Value="False" />
<Setter Property="DrawMajorGridLines" Value="False" />
<Setter Property="DrawMinorGridLines" Value="False" />
<Setter Property="TextFormatting" Value="{Binding XAxisTextFormatting}" />
<Setter Property="VisibleRange" Value="{Binding ParentViewModel.XRange, Mode=TwoWay}" />
<Setter Property="VisibleRangeLimit" Value="{Binding ParentViewModel.XRangeLimit}"/>
<Setter Property="AutoRange" Value="{Binding ParentViewModel.AutoRangeX}"/>
<Setter Property="GrowBy" Value="0.0, 0.0"/>
</Style>
</s:SciStockChart.XAxisStyle>
But the result is same, do I missing something?
- CHIA CHUN TANG answered 1 week ago
- last active 1 week ago
Hi Chia Chun Tang,
Thanks for your question.
SciStockChart is a preconfigured SciChartSurface version having some properties on its elements set to default values. Please take a look at the corresponding article for more info:
https://www.scichart.com/documentation/win/current/webframe.html#SciStockChart%20-%20Simplified%20Financial%20Charts.html
The spaces you see on the sides are controlled by the Axis.GrowBy property:
https://www.scichart.com/documentation/win/current/webframe.html#SciChart.Charting~SciChart.Charting.Visuals.Axes.AxisCore~GrowBy.html
To get rid of these spaces you can override the default value by setting the GrowBy property for the XAxis to “0.0, 0.0”.
With best regards,
Lex S., MSEE
SciChart Technical Support Engineer
- Lex answered 1 week ago
This task is now done and released as of version 3.2.575. SciChartVerticalGroup will now copy LayoutStrategies from the existing LayoutManager onto it’s SynchronisedLayoutManager so custom synchronised layouts will just work.
Regards
David
- David Burleigh answered 1 week ago
Is your question related to WPF (Windows charts) or JS (JavaScript charts)?
In SciChart.js there is a mechanism to get a callback on legend checkbox changed. See the LegendModifier documentation.
Subscribing to Checkbox Checked Changed
As well as subscribing to
BaseRenderableSeries.isVisibleChanged
, you
can now subscribe toLegendModifier.isCheckedChanged
event. This can
be done either in the constructor options toLegendModifier
or after
creation.const legend = new LegendModifier({ showCheckboxes: true, showSeriesMarkers: true, showLegend: true, // Subscribe to checked changed here isCheckedChangedCallback: (series, isChecked) => { console.log(`Option 1: Legend item ${series.type} isChecked=${isChecked}`); } }); // Or here after instantiation legend.isCheckedChanged.subscribe((args) => { console.log(`Option 2: Legend item ${args.series.type} isChecked=${args.isChecked}`); }); // Add the legend to the chart sciChartSurface.chartModifiers.add(legend);
- Andrew Burnett-Thompson answered 2 weeks ago
Hi there,
Please find attached an example that demonstrates how to use SciChart API to achieve the desired behavior.
The example utilizes PointMetadata API to add Selectable and Hoverable state to data points and Palette Provider API to change Fill color of individual columns depending of the state of the underlying data point. Also, a simple custom Chart Modifier is used to implement state changing behavior on Mouse events and trigger a chart redraw when such change occurs.
Please let me know if you have any questions regarding the example or any SciChart APIs that are used.
Best Regards,
Joeri, BS Inf
SciChart Software Engineer
- Joeri R answered 2 weeks ago
Hi Yu Dexiu,
Thanks for your question.
There isn’t such a callback on the LegendModifier.
However, since Legend checkboxes can hide or show a RenderableSeries, you can subscribe to IsVisibleChanged event on a RenderableSeries. It will be fired when a user changes series visibility through the Legend.
Alternatively, you can re-template the default Legend and have a binding on Checkboxes that will be triggered when they are checked/unchecked.
You can find more info about Legend customization here:
https://www.scichart.com/documentation/win/current/webframe.html#LegendModifier.html
With best regards,
Lex S., MSEE
SciChart Technical Support Engineer
- Lex answered 2 weeks ago
For server side licensing, the underlying component is in C++ and can be integrated into other languages and run on linux. We are currently working on improving the api and examples for this. Detailed questions on this need to be submitted on support.scichart.com as there are additional contractual requirements.
Regards
David
- David Burleigh answered 3 weeks ago
Thank you for getting in touch. The first thing we tend to ask for is steps or code to reproduce issues.
For SciChart.js (JavaScript) this can be created as a Codepen or CodeSandbox (here’s how).
This makes it really easy to share with the tech team & resolve problems fast.
Thanks for your understanding! We look forward to hearing back from you.
- Andrew Burnett-Thompson answered 3 weeks ago
- last active 3 weeks ago
Hello Max, we are investigating the error on our side and here are some updates on the issue.
The error occurs specifically with Next 14.1, and seems to be related to module resolution during compilation. Specifically while compiling CommonJS modules. (BTW, running the boilerplate app in dev mode with “–turbo” seems to work fine)
Unfortunately, SciChart sources are built in CommonJS, and the library doesn’t support ES Modules, at the moment. (v3.3.570)
But the recently released library version provides a bundle with ESM support – “scichart/_wasm/scichart.browser.mjs”.
So as a temporary workaround you could use it like this:
import { SciChartSurface, NumericAxis } from "scichart/_wasm/scichart.browser.mjs";
To enable type checking you may add
import * as SciChartValue from "scichart/_wasm/scichart.browser.mjs";
import * as SciChartType from "scichart";
const SciChart = SciChartValue as typeof SciChartType;
const { SciChartSurface, NumericAxis } = SciChart;
We will be posting updates here. And, let us know if that works on your side.
- Jim Risen answered 3 weeks ago
I am considering applying server-side licensing for my javerScript application.
In the document below, there is a phrase “Our server-side licensing component is written in C++.”
(https://support.scichart.com/index.php?/Knowledgebase/Article/View/17256/42/)
However, there is only asp.net sample code on the provided github.
(https://github.com/ABTSoftware/SciChart.JS.Examples/tree/master/Sandbox/demo-dotnet-server-licensing)
I wonder if there is a sample code implemented in C++ for server-side licensing.
Can you provide c++ sample code?
Also, are there any examples to run on Ubuntu?
- Lex answered 3 weeks ago
link to question on Nextjs forum.
- max keirn answered 4 weeks ago
- last active 3 weeks ago
Hi Ziv,
We discussed your inquiry.
Unfortunately, SciChart doesn’t provide this behavior out of the box.
However, it can be implemented on the user side by overriding the PerformScale(Point currentPoint, Point lastPoint, bool isSecondHalf) method of the YAxisDragModifier.
This method is called on every MouseMove event and calculates a new VisibleRange for an Axis based on the dragged distance. Please take a look:
https://www.scichart.com/documentation/win/current/webframe.html#SciChart.Charting~SciChart.Charting.ChartModifiers.AxisDragModifierBase~PerformScale.html
The default implementation is straightforward:
protected virtual void PerformScale(Point currentPoint, Point lastPoint, bool isSecondHalf)
{
var axis = CurrentAxis;
var scaledRange = CalculateScaledRange(currentPoint, lastPoint, isSecondHalf, axis);
axis.VisibleRange = scaledRange;
}
so you should just calculate the VisibleRange according to your desired behavior and assign it to the axis.VisibleRange instead of the scaledRange.
Hope this helps.
With best regards,
Lex S., MSEE
SciChart Technical Support Engineer
- Lex answered 4 weeks ago