Quantcast
Channel: Telerik Forums RSS
Viewing all articles
Browse latest Browse all 84751

Show RadColumnSparkline

$
0
0

Hi,

I am trying to show a RadColumnSparkline within a TimeBar, but I haven't been able to achieve this.

I want to show some data per day like in the column visualization example, this is some sample code like the one that I am using:

publicpartialclassMainWindow : Window
    {
        publicMainWindow()
        {
            InitializeComponent();
            
            DateTime today = DateTime.Today;
            List<MyCost> data = newList<MyCost>()
            {
                newMyCost() { Cost = 1,  MyDate=today },
                newMyCost() { Cost = 2,  MyDate= today.AddDays(1)},
                newMyCost() { Cost = 3, MyDate=today.AddDays(2) },
                newMyCost() { Cost = 4, MyDate=today.AddDays(3)},
                newMyCost() { Cost = 5, MyDate=today.AddDays(4)},
            };
            this.DataContext = data;
        }
    }
 
    publicclassMyCost
    {
        publicdoubleCost { get; set; }
        publicDateTime MyDate { get; set; }
    }

<telerik:RadColumnSparklinex:Name="PART_SparkbarControl"HorizontalAlignment="Left"VerticalAlignment="Top"Height="48"Width="400"
        telerik:StyleManager.Theme="Office_Blue"
        ItemsSource="{Binding}"
        XValuePath="MyDate"
        YValuePath="Cost"/>

Lets say that the first date is 03/17/2016, so I want to show data from 03/17 to 03/21 with the values 1 to 5, I'd expect to see something like the first image but instead I get the bars like in the second image.

The data is not being shown in the desired date.

I am not sure if I am missing some configuration or what I am soing wrong.

 


Viewing all articles
Browse latest Browse all 84751

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>