This is a migrated thread and some comments may be shown as answers.

RadChartView LinearAxis

10 Answers 154 Views
ChartView
This is a migrated thread and some comments may be shown as answers.
Keizo
Top achievements
Rank 1
Keizo asked on 05 Dec 2012, 03:15 AM
Hi,

I was
created in the spectrum of the chromatogram RadChart,
But it is slow drawing.
I tried to implement in RadChartView there. However, since that XAxis Holizontal Axis is not LinearAxis, it can not be rendered correctly.
Why is not there something like the Scatter Bar Series?


Thank you.

10 Answers, 1 is accepted

Sort by
0
Evgenia
Telerik team
answered on 06 Dec 2012, 05:14 PM
Hi Keizo,

 Scatter Point series work with Linear and Logarithmic Axis only as stated in our documentation. Currently we don't have a point series that works with categorical axes, but we have this in our plans for the future. In the meantime you can use a bar series with a point template that looks exactly like a scatter point. For example:

<telerik:BarSeries.PointTemplate>
    <DataTemplate>
        <Ellipse Width="6" Height="6" Fill="#FF5AA4D4" VerticalAlignment="Top">
            <Ellipse.RenderTransform>
                <TranslateTransform Y="-3" X="-3" />
            </Ellipse.RenderTransform>
        </Ellipse>
    </DataTemplate>
</telerik:BarSeries.PointTemplate>

Greetings,
Evgenia
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Keizo
Top achievements
Rank 1
answered on 07 Dec 2012, 01:51 AM
Hi Evgenia

Thanks to the tips that you gave me,
the chart was hoping was almost drawn.
However, there is no basis in the code particularly Height = 100000.
I have a large value for the line is deleted, even if you do not zoom.
I hope that will be released ScatterBarSeries.

<telerik:ScatterPointSeries XValueBinding="MsValue" YValueBinding="YValue">
  <telerik:ScatterPointSeries.PointTemplate>
    <DataTemplate>
      <Rectangle Width="1" Height="100000" Fill="White" StrokeThickness="0">
        <Rectangle.RenderTransform>
          <TranslateTransform Y="50000" X="0" />
        </Rectangle.RenderTransform>
      </Rectangle>
    </DataTemplate>
  </telerik:ScatterPointSeries.PointTemplate>
</telerik:ScatterPointSeries>

Thank you.
0
Evgenia
Telerik team
answered on 12 Dec 2012, 06:27 AM
Hello Keizo,

 Let me start with apologies for misleading you. My previous post and code snippet would have helped creating a Scatter Point Series with Categorical Horizontal Axis.
Reading again your post I realized that you need the opposite - Bar Series that act like Scatter Point, i.e. having a Linear Horizontal Axis.
Indeed you can render the scatter points as lines originating from the X axis. Alternatively to your DataTemplate you may use this one:

<telerik:ScatterPointSeries.PointTemplate>
             <DataTemplate>
                        <Canvas Width="2" Height="2">
                            <Rectangle Width="2" Height="2000" Fill="Blue"/>
                        </Canvas>
             </DataTemplate>
</telerik:ScatterPointSeries.PointTemplate>

Could you please be more specific, what do you mean by saying "I have a large value for the line is deleted, even if you do not zoom"? A sample image demonstrating this unwanted behaviour or a runnable sample will help us understand you.

All the best,
Evgenia
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Keizo
Top achievements
Rank 1
answered on 12 Dec 2012, 10:14 AM

Evgeniaさん

醜い英語で申し訳ありません。私は英語が苦手な日本人なので、いつもGoogleに翻訳を頼っています。
よくよく掲載文をみるとdeleteはclippingの間違いと思われます。

私が、描きたいチャートは幅が1pxelの棒グラフです。
しかし、X軸はCategoryではなくLinearのように正確でなければなりません。
そこで、ScatterPointSeriesで細長いRectangleを描画し、
その中心を高さの半分下方向にずらして目的を達成しようと考えました。
もっと別のアイデアがありましたらご教授ください。

The following is a Google translation

Mr. Evgenia

I'm sorry ugly in English. My English is not good because the Japanese, I have always relied on Google translate.
"Delete" is a mistake. "Clipping" is correct.

I have a chart that I want to draw the bar chart width is 1pxel.
However, the X-axis must be exactly like the Linear instead of Category.
Then, draw a Rectangle elongated ScatterPointSeries,
I think trying to achieve the desired shift in the direction of the center of the bottom half of the height.
Please Professor us if you have a different idea of more.

Thank you

0
Evgenia
Telerik team
answered on 14 Dec 2012, 10:53 AM
Hello Keizo,

 You may find attached a sample I prepared based on my last post. You'll also find a snapshot of the result. I'm assuming that this is exactly what you are after, if not , could you send a sample image that shows how do you want your chart to look like?

Kind regards,
Evgenia
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Keizo
Top achievements
Rank 1
answered on 14 Dec 2012, 01:01 PM
Thanks Evgenia

I confirmed the sample code.
Is what I was hoping for.
I did not understand the effect of the Canvas.

Thank you.
0
Keizo
Top achievements
Rank 1
answered on 05 Jun 2013, 11:18 AM
Dear Evgenia

Time has passed since a great deal, but a new problem was found.
The problem occurs when you expand the Y-axis.
Y value goes out of area outside, all bars will disappear.
I hope that the bars in the area can be seen and is trimmed.
Or there will not be a good idea or what?

Thank you.
0
Evgenia
Telerik team
answered on 10 Jun 2013, 08:20 AM
Hi Keizo,

 I'm not sure I understand your point. Could you please open a formal support thread and provide us a runnable sample that demonstrates that? Also why don't you set a custom Min/Max range for your YAxis via the Maximum , Minimum and MajorStep properties? You may find more about the properties here and also mind that you may set value for either one or all the properties (the others will be set automatically).

Regards,
Evgenia
Telerik

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Keizo
Top achievements
Rank 1
answered on 11 Jun 2013, 12:51 AM
Dear Evgenia

I think if you have look at the two images, you can understand immediately.
This problem is not be solved by samples you showed.
Data is no longer appear when you expand the Y-axis.

Thank you.
0
Evgenia
Telerik team
answered on 12 Jun 2013, 10:09 AM
Hi Keizo,

 Thanks for the images, I was able to reproduce the behaviour you described. The problem with the previous workaround is caused by the virtualization mechanism of RadChartView - objects that go outside of the visible range are collapsed. To prevent that from happening you can trick the control into thinking that bars don't go outside of the visible range.
Please have in mind that it is expected that you may find some abnormalities with the provided approach , since it is a workaround and not a steady, tested solution. Having this in mind here are two different workarounds for you to choose from:
1. You may increase the Canvas Width and Height , as well as its containing Rectangle's Width. You will also need a Canvas.Top and Canvas.Left settings like this:

<telerik:ScatterPointSeries>
               <telerik:ScatterPointSeries.PointTemplate>
                   <DataTemplate>
                       <Canvas Width="1000001" Height="1000001">
                           <Rectangle Width="1" Height="500000" Fill="Blue" Canvas.Left="500000" Canvas.Top="500000"/>
                       </Canvas>
                   </DataTemplate>
               </telerik:ScatterPointSeries.PointTemplate>

This way all the bars will be drawn and visible no matter how you have zoomed / panned vertically.

2. The other workaround that does not suffer from aforementioned problem is to use DatetimeContinuous as Horizontal Axis. For your DateTime labels to be visualized as doubles, I use converter. You may find attached a sample solution demonstrating this.

Once again I'd suggest that you test the workarounds provided before using them.

Regards,
Evgenia
Telerik

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
ChartView
Asked by
Keizo
Top achievements
Rank 1
Answers by
Evgenia
Telerik team
Keizo
Top achievements
Rank 1
Share this question
or