SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, iOS Chart, Android Chart and JavaScript Chart Components

0 votes

I’m trying to have a transparent axisLabelFill for my yAxis and a black axisLabelFill for my xAxis. How can I achieve that?

0 votes

How can I apply my style and template to my axes if I created the axes as NumericAxisViewModel in code and bound them to my SciChartSurface in my xaml view?


  • Roland D asked 3 years ago
  • last active 2 weeks ago
0 votes


When I did some practices with your example app, I found some features does not work as I expected.
Here is and I wrote additional lines on xAxis builder, yAxis builder and surface.chartModifiers,

public class CandlestickChartFragment extends ExampleBaseFragment {
    SciChartSurface surface;

    protected int getLayoutId() {
        return R.layout.example_single_chart_fragment;

    protected void initExample() {
        PriceSeries priceSeries = DataManager.getInstance().getPriceDataIndu(getActivity());
        int size = priceSeries.size();

        final IAxis xAxis = sciChartBuilder.newCategoryDateAxis()
            .withVisibleRange(size - 30, size)
            .withGrowBy(0, 0.1)
            // Start additional lines
            // End additional lines
        final IAxis yAxis = sciChartBuilder.newNumericAxis()
            // Start additional lines
            .withTextFormatting("$ #.#")
            // End additional lines
            .withGrowBy(0d, 0.1d)

        IOhlcDataSeries<Date, Double> dataSeries = new OhlcDataSeries<>(Date.class, Double.class);
        dataSeries.append(priceSeries.getDateData(), priceSeries.getOpenData(), priceSeries.getHighData(), priceSeries.getLowData(), priceSeries.getCloseData());

        final FastCandlestickRenderableSeries rSeries = sciChartBuilder.newCandlestickSeries()

        UpdateSuspender.using(surface, new Runnable() {
            public void run() {
                Collections.addAll(surface.getXAxes(), xAxis);
                Collections.addAll(surface.getYAxes(), yAxis);
                Collections.addAll(surface.getRenderableSeries(), rSeries);
                Collections.addAll(surface.getChartModifiers(), sciChartBuilder.newModifierGroupWithDefaultModifiers()
                    // Start additional lines
                    // End additional lines

                sciChartBuilder.newAnimator(rSeries).withWaveTransformation().withInterpolator(new DecelerateInterpolator()).withDuration(3000).withStartDelay(350).start();

The result is below picture. I also attached the same image.
Displayed xAxis values are [27 Sep, 04 Oct, 11 Oct, 18 Oct, 25 Oct, 01 Nov].

The problems are
1. xAxis(CategoryDate) tick values should be started with year, even though it does not have enough margin. It looks updated format is not applied.
2. Cursor should be shown on touch event, but it does not be displayed at all.

I ran above code on [Samsung Galaxy S9, API 26] and [Xiaomi Mi A1, API 25] and same problems are happened.

Could I know what I missed?

1 vote

Hi folks,

I’ve just upgraded a project to SciChart version 3.x. I got most everything working, but one issue remains…

In 1.x and 2.x, I was able to hide cursor labels by adding an empty AxisLabelTemplate like this:

<s:CursorModifier x:Name="MainCursor" ShowAxisLabels="True" ShowTooltip="False" LineOverlayStyle="{x:Null}">
         <!-- This empty template hides Themes cursor labels -->
         <ControlTemplate TargetType="s:TemplatableControl" />

In 3.x, this doesn’t quite seem to work. I have no y-axis cursor label, but I do have an x-axis cursor label. (My axes are treated differently; one is in XAML, and one is in code since I swap between linear and log axes occasionally.)

How can I get rid of the x-axis cursor?


  • yefchak asked 8 years ago
  • last active 8 years ago
Showing 4 results
This template supports the sidebar's widgets. Add one or use Full Width layout.