Nativescript-ui charts










0














I'm working on a Nativescript/Angular project where I want to show data coming from IOT devices using different charts. I just got into Nativescript development and did not find all the answers to my questions in the docs, hoping someone here might help. I have looked at some forums and the official docs but did't not succeed yet.



I need a linechart to show values on the Yaxis and the time on the Xaxis. This is where i found my problem. I want the Xaxis to show hours not milliseconds as it looks like it is showing right now. The list that populates the chart is build up of objects witch are structured like this:



timestamp: Date; value: number;



and the output of one object looks like this:




"timestamp": "2018-11-12T05:19:13.516Z",
"value": 40.20774023858568



I did not get the lable rotation to work either so there are absolutely something that I am doing wrong.



<RadCartesianChart class="chart" [ngSwitch]="" tkExampleTitle tkToggleNavButton>
<DateTimeCategoricalAxis tkCartesianHorizontalAxis dateFormat="dd.MMM H:mm"
labelFitMode="Rotate"
labelRotationAngle="1.3"></DateTimeCategoricalAxis>
<CategoricalAxis tkCartesianHorizontalAxis dateFormat="hh">/CategoricalAxis>
<LinearAxis tkCartesianVerticalAxis></LinearAxis>
<LineSeries tkCartesianSeries
[items]="readings"categoryProperty="timestamp"
valueProperty="value</LineSeries>
</RadCartesianChart>









share|improve this question





















  • It seems as DateTimeContinuousAxis extends the CategoricalAxis and can therefore replace it completely. I thought that it only handled settings and that you needed to use both. The Hour issue also got fixed byt the DateTimeContinuousAxis, the docs actually say "It can be used if the category of the data points is of type Calendar." Okey, on to bigger and better things!
    – Johannes Kraft
    Nov 13 at 7:16
















0














I'm working on a Nativescript/Angular project where I want to show data coming from IOT devices using different charts. I just got into Nativescript development and did not find all the answers to my questions in the docs, hoping someone here might help. I have looked at some forums and the official docs but did't not succeed yet.



I need a linechart to show values on the Yaxis and the time on the Xaxis. This is where i found my problem. I want the Xaxis to show hours not milliseconds as it looks like it is showing right now. The list that populates the chart is build up of objects witch are structured like this:



timestamp: Date; value: number;



and the output of one object looks like this:




"timestamp": "2018-11-12T05:19:13.516Z",
"value": 40.20774023858568



I did not get the lable rotation to work either so there are absolutely something that I am doing wrong.



<RadCartesianChart class="chart" [ngSwitch]="" tkExampleTitle tkToggleNavButton>
<DateTimeCategoricalAxis tkCartesianHorizontalAxis dateFormat="dd.MMM H:mm"
labelFitMode="Rotate"
labelRotationAngle="1.3"></DateTimeCategoricalAxis>
<CategoricalAxis tkCartesianHorizontalAxis dateFormat="hh">/CategoricalAxis>
<LinearAxis tkCartesianVerticalAxis></LinearAxis>
<LineSeries tkCartesianSeries
[items]="readings"categoryProperty="timestamp"
valueProperty="value</LineSeries>
</RadCartesianChart>









share|improve this question





















  • It seems as DateTimeContinuousAxis extends the CategoricalAxis and can therefore replace it completely. I thought that it only handled settings and that you needed to use both. The Hour issue also got fixed byt the DateTimeContinuousAxis, the docs actually say "It can be used if the category of the data points is of type Calendar." Okey, on to bigger and better things!
    – Johannes Kraft
    Nov 13 at 7:16














0












0








0







I'm working on a Nativescript/Angular project where I want to show data coming from IOT devices using different charts. I just got into Nativescript development and did not find all the answers to my questions in the docs, hoping someone here might help. I have looked at some forums and the official docs but did't not succeed yet.



I need a linechart to show values on the Yaxis and the time on the Xaxis. This is where i found my problem. I want the Xaxis to show hours not milliseconds as it looks like it is showing right now. The list that populates the chart is build up of objects witch are structured like this:



timestamp: Date; value: number;



and the output of one object looks like this:




"timestamp": "2018-11-12T05:19:13.516Z",
"value": 40.20774023858568



I did not get the lable rotation to work either so there are absolutely something that I am doing wrong.



<RadCartesianChart class="chart" [ngSwitch]="" tkExampleTitle tkToggleNavButton>
<DateTimeCategoricalAxis tkCartesianHorizontalAxis dateFormat="dd.MMM H:mm"
labelFitMode="Rotate"
labelRotationAngle="1.3"></DateTimeCategoricalAxis>
<CategoricalAxis tkCartesianHorizontalAxis dateFormat="hh">/CategoricalAxis>
<LinearAxis tkCartesianVerticalAxis></LinearAxis>
<LineSeries tkCartesianSeries
[items]="readings"categoryProperty="timestamp"
valueProperty="value</LineSeries>
</RadCartesianChart>









share|improve this question













I'm working on a Nativescript/Angular project where I want to show data coming from IOT devices using different charts. I just got into Nativescript development and did not find all the answers to my questions in the docs, hoping someone here might help. I have looked at some forums and the official docs but did't not succeed yet.



I need a linechart to show values on the Yaxis and the time on the Xaxis. This is where i found my problem. I want the Xaxis to show hours not milliseconds as it looks like it is showing right now. The list that populates the chart is build up of objects witch are structured like this:



timestamp: Date; value: number;



and the output of one object looks like this:




"timestamp": "2018-11-12T05:19:13.516Z",
"value": 40.20774023858568



I did not get the lable rotation to work either so there are absolutely something that I am doing wrong.



<RadCartesianChart class="chart" [ngSwitch]="" tkExampleTitle tkToggleNavButton>
<DateTimeCategoricalAxis tkCartesianHorizontalAxis dateFormat="dd.MMM H:mm"
labelFitMode="Rotate"
labelRotationAngle="1.3"></DateTimeCategoricalAxis>
<CategoricalAxis tkCartesianHorizontalAxis dateFormat="hh">/CategoricalAxis>
<LinearAxis tkCartesianVerticalAxis></LinearAxis>
<LineSeries tkCartesianSeries
[items]="readings"categoryProperty="timestamp"
valueProperty="value</LineSeries>
</RadCartesianChart>






angular2-nativescript nativescript-telerik-ui






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 12 at 14:06









Johannes Kraft

329




329











  • It seems as DateTimeContinuousAxis extends the CategoricalAxis and can therefore replace it completely. I thought that it only handled settings and that you needed to use both. The Hour issue also got fixed byt the DateTimeContinuousAxis, the docs actually say "It can be used if the category of the data points is of type Calendar." Okey, on to bigger and better things!
    – Johannes Kraft
    Nov 13 at 7:16

















  • It seems as DateTimeContinuousAxis extends the CategoricalAxis and can therefore replace it completely. I thought that it only handled settings and that you needed to use both. The Hour issue also got fixed byt the DateTimeContinuousAxis, the docs actually say "It can be used if the category of the data points is of type Calendar." Okey, on to bigger and better things!
    – Johannes Kraft
    Nov 13 at 7:16
















It seems as DateTimeContinuousAxis extends the CategoricalAxis and can therefore replace it completely. I thought that it only handled settings and that you needed to use both. The Hour issue also got fixed byt the DateTimeContinuousAxis, the docs actually say "It can be used if the category of the data points is of type Calendar." Okey, on to bigger and better things!
– Johannes Kraft
Nov 13 at 7:16





It seems as DateTimeContinuousAxis extends the CategoricalAxis and can therefore replace it completely. I thought that it only handled settings and that you needed to use both. The Hour issue also got fixed byt the DateTimeContinuousAxis, the docs actually say "It can be used if the category of the data points is of type Calendar." Okey, on to bigger and better things!
– Johannes Kraft
Nov 13 at 7:16


















active

oldest

votes











Your Answer






StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53263847%2fnativescript-ui-charts%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown






























active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes















draft saved

draft discarded
















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.





Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


Please pay close attention to the following guidance:


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53263847%2fnativescript-ui-charts%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







這個網誌中的熱門文章

How to read a connectionString WITH PROVIDER in .NET Core?

Node.js Script on GitHub Pages or Amazon S3

Museum of Modern and Contemporary Art of Trento and Rovereto