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

Chart x and y axis max at 1

2 Answers 57 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Stephen
Top achievements
Rank 1
Stephen asked on 28 Aug 2013, 09:13 PM
I've been playing with the bubble charts recently.  
When using static data, there is no problem, but when connecting to my dataset the maximum values for both x and y are set to 1.

When this happens my visuals are off screen. 
If I set the axis majorUnit to 5000, some of my categories become visible.. but I have no grid lines displayed other than 0 and 5,000.
BaseUnitStep: "fit" or "auto" have no effect.

Thanks,
-Stephen

2 Answers, 1 is accepted

Sort by
0
Iliana Dyankova
Telerik team
answered on 30 Aug 2013, 02:57 PM
Hi Stephen,

In order to avoid similar issues I will suggest changing axes max values depending on the data (for this purpose setOptions can be used). For example:  

var chart = $("#chart").data("kendoChart");
chart.setOptions({ yAxis: { max: 200000 } });
chart.refresh();
Regards,
Iliana Nikolova
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Accepted
Stephen
Top achievements
Rank 1
answered on 04 Sep 2013, 10:01 PM
Actually, defining a schema resolved this almost perfectly.

$("#chart").kendoChart({
  dataSource: {
    data: reportResult,
 
    schema: {
      model: {
        fields: {
          Category    : { type: "string" },
          Revenue    : { type: "number" },
          GP        : { type: "number" },
          Quantity        : { type: "number" },
          SubCategory    : { type: "string" },
          Store        : { type: "string" },
        }
      }
    }
  }
});

This way, the chart sets the max dynamically.
Tags
General Discussions
Asked by
Stephen
Top achievements
Rank 1
Answers by
Iliana Dyankova
Telerik team
Stephen
Top achievements
Rank 1
Share this question
or