Pre loader

Tag: axis label

Welcome to the SciChart Forums!

  • Please read our Question Asking Guidelines for how to format a good question
  • Some reputation is required to post answers. Get up-voted to avoid the spam filter!
  • We welcome community answers and upvotes. Every Q&A improves SciChart for everyone

WPF Forums | JavaScript Forums | Android Forums | iOS Forums

0 votes
13k views

Hello.

Thank you for creating great chart library.
I’m now using a trial version for test that is enable to use at project that I’m concerned.

I have one problem that when I set zoom function to chart, and zoomed too much, axis label disappears.
(I used mouse scroll zoom, I attached zoom before image and after image)

How can I control this problem?
Is there any properties or setting for this?

1 vote
13k views

Hi,

Thank you for adding the shifted axis support in SciChart. There is still a problem though, the axis labels are on the right side of the axis overlapping the graph. I want to place the labels on the left side of the axis. I have tried giving the LabelTickStyle with HorizontalAnchorPoint.Left with no avail. I have also tried scaling the axis to -1, which you might have guessed flips the labels 180 degrees as well.

I have also tried AxisAlignment = Left, but it doesn’t seem to work with the shifted axis, if I mark the axis IsCenter =false it does place the labels on the left, but no longer shifts them. I have also tried doing the same thing with IsCenter = true ofcourse, but that seems to just flip the labels in place with their tick lines.

Is there a way to place the labels on the left side of the Y axis while shifted?

Thank you.

  • kewur asked 9 years ago
  • last active 9 years ago
1 vote
2k views

I’m trying to add a axis label/marker to the yAxis of my chart.
This label should follow the intersection between a FastLineRenderableSeries (that i’m using to render a moving average filtered dataSeries) and the yAxis.

I tried to extend the “draw” method of the FastLineRenderableSeries to draw a label ontop of the yAXis, using the “drawModifiersAxisLabel” helper function. Like:

class CustomFastLineRenderableSeries extends FastLineRenderableSeries {
draw(renderContext: WebGlRenderContext2D, renderPassData: RenderPassData) {
    super.draw(renderContext, renderPassData)
    const yAxis = getYAxis(this.parentSurface);
    drawModifiersAxisLabel(
        yAxis,
        renderContext,
        150, // testing values
        "#00ff00", // testing values
        "#00ff00", // testing values
    );
}

but the label don’t get drawn.

The attached image shows the desired feature (image from another charting lib)

How can I implement this?

0 votes
5k views

Hello,
We would like to have a axis behavior similar to Mathlab. The idea is that for the x axis a common exponent is written only once on the right and for the y axis the common exponent is written once on the top of the chart.
Is this possible ?
How can we implement it ?

Thank you !

See figure attached

0 votes
9k views

hi,
I am currently trying to implement a chart with a category datetime axis. I custom a label formatter for handling a custom datetime format, let say”yyyy/MM”. Only the 1st tick of each year will display the label.
Eg: data with[“2018/1”,“2018/3”,“2018/5”], only show 2018/1, others show with empty/no label

I find the overrided method of label and cursor label formatter have only returned Comparable object which should be only returned the current rederering datetime axis label’s date.
Is there any way to find the previous one label to compare or any suggestion for implement this axis? Thank you!

  • may lym asked 5 years ago
  • last active 5 years ago
0 votes
4k views

Two questions. First how do I draw an axis label for every column in a column chart. See attached pic. Also the first axis label is correctly positioned under the column chart but subsequent ones are off to the left quite a bit. Not sure how to fix either. Here is xaml to rotate the axis lablel

<Style x:Key="SessionBreakDownByHourColumnGraphXAxisLabelStyle" TargetType="sc:DefaultTickLabel">
    <Setter Property="LayoutTransform">
        <Setter.Value>
            <RotateTransform Angle="45" />
        </Setter.Value>
    </Setter>
</Style>

UPDATE: Setting autoticks to false shows all axis labels but still off center. Adding new photo.
UPDATE: So changing xaml to below and adding a few to visible range on xaxis seems to solve the issue. Still unsure why i have to modify the visible range slightly.

<Style x:Key="SessionBreakDownByHourColumnGraphXAxisLabelStyle" TargetType="sc:DefaultTickLabel">
    <Setter Property="LayoutTransform">
        <Setter.Value>
            <RotateTransform Angle="45"/>
        </Setter.Value>
    </Setter>
    <Setter Property="HorizontalAnchorPoint" Value="Left"/>
    <Setter Property="VerticalAnchorPoint" Value="Bottom"/>
</Style>

Final Xaml that solved for me

<Style x:Key="SessionBreakDownByHourColumnGraphXAxisLabelStyle" TargetType="sc:DefaultTickLabel">
    <Setter Property="LayoutTransform">
        <Setter.Value>
            <RotateTransform Angle="45"/>
        </Setter.Value>
    </Setter>
    <Setter Property="HorizontalAnchorPoint" Value="Left"/>
    <Setter Property="VerticalAnchorPoint" Value="Bottom"/>
    <Setter Property="FontSize" Value="9"/>
    <Setter Property="FontWeight" Value="Bold"/>
    <Setter Property="Margin" Value="-5,0,0,0"></Setter>
    <Setter Property="Foreground" Value="{DynamicResource AccentBaseColorBrush}"/>
</Style>
  • John asked 4 years ago
  • last active 4 years ago
0 votes
4k views

How to make chart axis (date axis in my case) to move with scrolling?

Because currently labels staying on it’s positions and just refreshing its values.

let xAxis = SCIDateTimeAxis()
xAxis.axisId = ChartWrapper.SURFACE_MAIN_X_AXIS_ID
xAxis.autoRange = .never
xAxis.visibleRange = sharedXRange
xAxis.style.drawMajorBands = false
xAxis.style.drawMajorTicks = false
xAxis.style.drawMinorTicks = false
xAxis.style.drawMinorGridLines = true
xAxis.textFormatting = "HH:mm:ss"
xAxs.style.drawLabels = true

Best regards, Vadim

Showing 7 results

Try SciChart Today

Start a trial and discover why we are the choice
of demanding developers worldwide

Start TrialCase Studies