I have a chart with multiple series (See attached).
I want to list the dates from the series available in the same data.
The problem im experiencing is selecting a category axis value. Setting it on any of the series causes all of the series to not show, but the dates do for all rows.
Json data:
Within this data the chart has 4 series:
Combined.OrderCount;
Collection.OrderCount;
Delivery.OrderCount;
Combined: Sales
for those series I want to use the 'Date' field.
The HTML looks like this:
Any ideas? Setting the categories manually works but I don't want to do it this way as it will be more to maintain and more effort over more charts.
Additionally - why does the legend disappear after the chart gets its data?
Thanks, Matt
I want to list the dates from the series available in the same data.
The problem im experiencing is selecting a category axis value. Setting it on any of the series causes all of the series to not show, but the dates do for all rows.
Json data:
01.[{02."InStore":{"OrderCount":0,"Sales":0,"Canceled":null},03."Collection":{"OrderCount":31,"Sales":28290,"Canceled":null},04."Delivery":{"OrderCount":10,"Sales":15883,"Canceled":null},05."Combined":{"OrderCount":41,"Sales":44173,"Canceled":1},06."Date":"\/Date(1381964400000)\/"},07.{"InStore":{"OrderCount":0,"Sales":0,"Canceled":null},"Collection":{"OrderCount":49,"Sales":31990,"Canceled":null},08."Delivery":{"OrderCount":18,"Sales":36463,"Canceled":null}09.…10.}]Combined.OrderCount;
Collection.OrderCount;
Delivery.OrderCount;
Combined: Sales
for those series I want to use the 'Date' field.
The HTML looks like this:
01.<div class="chart-wrapper" data-role="chart"02. data-title="Order Details"03. data-theme="bootstrap"04. data-legend="{ position: 'bottom' }"05. data-series-defaults="{ type: 'line' }"06.@* data-category-axis="{07. field: 'Date',08. baseUnit: 'day',09. type: 'date',10. labels: {11. rotation: -9012. },13. majorGridLines: {14. visible: false15. }16. }"*@17.@* data-category-axis="{18. categories: [1,2,3,4,5,6,7]19. }"*@20. data-category-axis="{21. labels: { rotation: -90, template: 'Hello' }22. }"23. data-value-axis="[24. { name: 'orderCount', title: { text: 'Orders' } },25. { name: 'sales', title: { text:'Sales' } }26. ]"27. data-tooltip="{28. visible: true,29. template: '<div>#: kendo.toString(dataItem.Date, \'dddd\') # #: kendo.toString(dataItem.Date, \'d\')#</div><div>Order Count:#: value #</div>'30. }"31. data-group="{field:Date}"32. data-series="[33. { 'name': 'OrderCount', 'field': 'Combined.OrderCount', 'axis': 'orderCount' },34. { 'name': 'Delivery', 'field': 'Delivery.OrderCount', 'axis':'orderCount', 'type': 'column', 'stack': 'true' },35. { 'name': 'Collection', 'field': 'Collection.OrderCount', 'axis': 'orderCount', 'type': 'column', 'stack': 'true' },36. { 'name': 'Sales', 'field': 'Combined.Sales', 'axis': 'sales', 'type': 'area' }37. ]"38. data-bind="source: dataSource">39. </div>Additionally - why does the legend disappear after the chart gets its data?
Thanks, Matt