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

[Solved] Chart formating

1 Answer 96 Views
Chart for HTML
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Thomas
Top achievements
Rank 1
Thomas asked on 18 Jul 2013, 09:51 PM
Hello,

I'm new to Kendo and need help in re-creating these graphs in Kendo.  This is what I want the graph to look like: http://prntscr.com/1g7dcd

This is what I've been able to do in Kendo so far http://prntscr.com/1g7dg7.

As you can see, I need to do the following:

1.  Add the additional categories to create the date range values.  Not sure how to do that in Kendo.
2.  Add Major ticks for each week.
3.  Since there's such a big difference between the 'Enroll revenue' and the other two graphs, would it possible to expand the Revenue (y values) to show more granular data?

Thank you so much for your help.

Here's what I have in my simple chart:

function createChart() {
     $("#chart").kendoChart({
         title: {
             text: "Cumulative Revenue"
         },
         legend: {
             position: "bottom"
         },
         seriesDefaults: {
             type: "line"
         },
         series: [{
             name: "Enroll Revenue",
             data: [86812.43,87742.38,88549.73,89608.06,89589.56,88575.22,87797.3,86026,85482.2,85762.37,86525.66,86654.34,85296.69,84184.55,82540.85,81223.42,81091.67,81421.27,81521.05,80625.7,79355.87,78151.15,77263.1,77788.56,78413.71,79378.56,79229.76,82458.26,80594.72,76552.78,76741.86,77354.91,76622.71,76213.13,75704.66,75659.51,75597.66,77104.76,77597.31,78058.31,78296.71,78449.16,77989.56,78608.29,79945.39,81072.29]
         },{
             name: "Rebill Revenue",
             data: [2156584.95,2137907.12,2125783.05,2131462.39,2140959.49,2154214.75,2165316.9,2167596.2,2154407.69,2157407.33,2178082.27,2178025.48,2195949.01,2193301.86,2183147.54,2164722.18,2162704.77,2157976,2174062.5,2170305.47,2160723.84,2152970.88,2132008.71,2123032.83,2123264.48,2133127.94,2163825.34,2184353.07,2190690.87,2094897.05,2096472.27,2109582.66,2121255.18,2132374.6,2130669.5,2122053.84,2102011.49,2097056.88,2097323.08,2090949.59,2097952.14,2099395.52,2085371.2,2082838.84,2095024.52,2096953.98]
         },{
             name: "Total Revenue",
             data: [1993223.97,1977564.19,1961845.78,1962748.04,1965807.18,1984038.91,1999085.95,2004322.25,1994423.65,1995406.54,2009126.92,2006998.2,2027280.73,2029113.71,2021620.47,1999000.18,1991702.85,1979214.95,1994561.95,1992524.12,1986024.94,1984448.54,1962373.91,1948369.31,1941704.09,1945428.31,1965610.29,1988208.48,1992403.37,1897822.62,1884949.6,1878005.5,1889872.28,1892123.41,1895369.76,1892200.15,1866012.76,1850106.33,1846092.08,1840612.28,1846482.33,1851327.42,1838170.08,1830681.42,1830745.2,1833306.55]
         }],
         xAxis: {
             majorticks: {
                 width: 3
             },
             majorunit: 7
         },             
         categoryAxis: [{
             labels: {
                 step: 7
                 },
             categories: ["5/2/2013 16:33","5/3/2013 16:33","5/4/2013 16:33","5/5/2013 16:33","5/6/2013 16:33",,"5/7/2013 16:33","5/8/2013 16:33","5/9/2013 16:33","5/10/2013 16:33","5/11/2013 16:33","5/12/2013 16:33","5/13/2013 16:33","5/14/2013 16:33","5/15/2013 16:33","5/16/2013 16:33","5/17/2013 16:33","5/18/2013 16:33","5/19/2013 16:33","5/20/2013 16:33","5/21/2013 16:33","5/22/2013 16:33","5/23/2013 16:33","5/24/2013 16:33","5/25/2013 16:33","5/26/2013 16:33","5/27/2013 16:33","5/28/2013 16:33","5/29/2013 16:33","5/30/2013 16:33","6/1/2013 16:33","6/2/2013 16:33","6/3/2013 16:33","6/4/2013 16:33","6/5/2013 16:33","6/6/2013 16:33","6/7/2013 16:33","6/8/2013 16:33","6/9/2013 16:33","6/10/2013 16:33","6/11/2013 16:33","6/12/2013 16:33","6/13/2013 16:33","6/14/2013 16:33","6/15/2013 16:33","6/16/2013 16:33","6/17/2013 16:33"]
         }]
         ,
         tooltip: {
             visible: true,
             format: "${0}",
             template: "#= series.name #: #= value #"
         }
     });
 }
 
 $(document).ready(createChart);
 $(document).bind("kendo:skinChange", createChart);

1 Answer, 1 is accepted

Sort by
0
Tsvetina
Telerik team
answered on 19 Jul 2013, 03:01 PM
Hi Thomas,

 
This forum category is dedicated to the RadChart for Windows 8 HTML and not the Kendo UI DataViz Chart. 

I would advise you to either open a support ticket or post your questions in the Kendo UI premium forums or StackOverflow forums.

To give you some basic instructions that can get you started:
1) You cannot have a second category axis but you can define a template for the category axis labels, where you can add more text: categoryAxis.labels.template.
2) You can consider setting your categoryAxis's baseUnit property to weeks: categoryAxis.baseUnit.
4) Try setting the min and max values of the valueAxis to define a larger interval: valueAxis.min , valueAxis.max.

If you need further assistance, please post in the relevant forums.

Regards,
Tsvetina
Telerik

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
Chart for HTML
Asked by
Thomas
Top achievements
Rank 1
Answers by
Tsvetina
Telerik team
Share this question
or