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?
- Marcel asked 11 years ago
- last edited 10 years ago
- You must login to post comments
Hi Marcel,
Please try out this solution – uses MultiBinding and ValueConverter, looks for AxisTitle using DataSeries.SeriesName, so you still need to set it, but to any value you want.
Put this inside the DataTemplate:
<TextBlock Grid.Row="0" Grid.Column="4" Margin="3,3,3,3" FontSize="10" FontWeight="Bold" Foreground="{Binding SeriesColor, Converter={StaticResource ColorToBrushConverter}}"> <TextBlock.Text> <MultiBinding Converter="{StaticResource SeriesNameToAxisTitleConverter}" Mode="OneTime"> <Binding Path="SeriesName" /> <Binding ElementName="sciChart" Path="." /> </MultiBinding> </TextBlock.Text> </TextBlock>
ValueConverter code:
public class SeriesNameToAxisTitleConverter: IMultiValueConverter { public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture) { var seriesName = (string)values[0]; var sciChartSurface = (ISciChartSurface)values[1]; var currentSeries = sciChartSurface.RenderableSeries.SingleOrDefault(series => series.DataSeries.SeriesName == seriesName); var yAxisId = currentSeries.YAxisId; var axisTitle = sciChartSurface.YAxes.Single(axis => axis.Id == yAxisId).AxisTitle; return axisTitle; } public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture) { throw new NotImplementedException(); } }
Is this a suitable way to achieve what do you want?
Best regards,
Yuriy
- Yuriy Zadereckiy answered 11 years ago
-
Hello Yuriy, yes it is suitable, thank you very much! Have a nice day!
- You must login to post comments
I solved this problem by binding to SeriesName and set this before with the name for the YAxis, but surely there is a better way
- Marcel answered 11 years ago
- You must login to post comments
Please login first to submit.