Hello all,
I have a candle-chart with the following x-Axis:
<s:SciStockChart.XAxisStyle>
<Style TargetType="s:CategoryDateTimeAxis">
<Setter Property="BarTimeFrame" Value="{Binding BarTimeFrame, Mode=OneWay}"/>
<Setter Property="DrawMinorGridLines" Value="False"/>
<Setter Property="DrawMajorBands" Value="True"/>
<Setter Property="VisibleRange" Value="{Binding XVisibleRange, Mode=TwoWay}"/>
<Setter Property="DrawMinorGridLines" Value="False"/>
<Setter Property="AutoRange" Value="{Binding AutoRange, Mode=TwoWay}" />
<Setter Property="GrowBy" Value="0, 0.1"/>
</Style>
</s:SciStockChart.XAxisStyle>
I want to add a vertical line at a specific date:
VerticalLineAnnotation newVerticalLine = new VerticalLineAnnotation();
newVerticalLine.X1 = ((DateTime)pAnnotationAttributes.GetValue(GUI_AnnotationAttributes.TimeValue)).;
Doing this I get the following exception:
Ein Ausnahmefehler des Typs “System.InvalidCastException” ist in mscorlib.dll aufgetreten.
Zusätzliche Informationen: Invalid cast from ‘DateTime’ to ‘Int32’.
Regards
Michael
- Michael Ullrich asked 9 years ago
- You must login to post comments
Hi there,
If your XAxis is CategoryDateTimeAxis, then any annotation.X1 value requires an integer.
This is the index to the DataSeries.XValues as category axis uses Index, not Date to measure on the X-Axis.
Please try it and let me know if this helps,
Best regards,
Andrew
- Andrew Burnett-Thompson answered 9 years ago
- You must login to post comments
thanks, how can I transform the DateTime to the appropriate int value?
Regards
Michael
- Michael Ullrich answered 9 years ago
- You must login to post comments
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-dev.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?
- Michael Ullrich answered 9 years ago
-
Hi Micheal, that will do it, but this method will perform faster! http://support.scichart.com/index.php?/Knowledgebase/Article/View/17207/31/convert-pixel-to-data-coordinates Best regards, Andrew
- You must login to post comments
Please login first to submit.