SergioFeitoza Posted June 10, 2020 Posted June 10, 2020 Hi. I need your help. I have some doubts about formatting my KendoUI chart. Most are about formatting. I tried to show them in the figure attached. The codes I am using are in the next lines. Main doubt is how to format the horizontal axis. I do not find the right properties to use. THE CODES I AM USING a) To insert the records in a dataset uniMainModule.cdsTop.AppendRecord([distM, RdynD].V[0], RdynD.V[1],RdynD.V[2],moduF, 0 , 0 , 0 ,ncest]); bb) CODE TO FIX DECIMALS ChartSeries.Values['Fmod'] := 'serFmod'; ChartProperties.Values['valueAxis'] := '{labels: {format: "#,0.0"}}'; // vertical axis one decimal ChartProperties.Values['tooltip'] := '{visible: true, format: "#,0.000"}'; // points 3 decimals ChartSeriesDefaults := 'labels: {visible: true, position: "insideEnd", format: "#,0.00"}'; ///////////////////////////////////////////// procedure TfResults.dbChartTopAjaxEvent(Sender: TComponent; EventName: string; Params: TUniStrings); begin if EventName = 'ClickSeries' then ShowMessage('name = '+Params.Values['name']+'</br>'+ 'category = '+Params.Values['category']+'</br>'+ 'value = '+Params.Values['value'] ); end; Quote
Sherzod Posted June 10, 2020 Posted June 10, 2020 1 hour ago, SergioFeitoza said: I need your help. 1 hour ago, SergioFeitoza said: I have some doubts about formatting my KendoUI chart. Hi, At least attach a test case please, we don’t know what and how you use. Quote
SergioFeitoza Posted June 12, 2020 Author Posted June 12, 2020 Sherzod . The test case you request is in this post and attached. http://forums.unigui.com/index.php?/topic/12970-change-label-of-unichart/&_fromLogin=1 If you click in the Graph.bmp you will see in the horizontal axis exactly what I need to obtain . It is generated with the test case ChartSample01.zip also attached. I need in the horizontal axis a float number with just one decimal . I tried to find a code to do this but not found. I think this is to be done with ClientEvents > ExtEvents or ClientEvents > UniEvents but I do not know how What I do not understand also is that I can not find anywhere in the code where the number of decimals of the horizontal is fixed. For example if I want to change from 1 to 2decimals.In the code Idid not find any event doing this but the result show it ChartSample01.zip Quote
Sherzod Posted June 13, 2020 Posted June 13, 2020 2 hours ago, SergioFeitoza said: The test case you request is in this post and attached. Thanks for the testcase. 2 hours ago, SergioFeitoza said: I need in the horizontal axis a float number with just one decimal . I tried to find a code to do this but not found. Sorry, do you want to remove the fractional part!? Quote
SergioFeitoza Posted June 13, 2020 Author Posted June 13, 2020 10 hours ago, Sherzod said: Thanks for the testcase. Sorry, do you want to remove the fractional part!? No. I do not want to remove the fractional part (like 2200, ). I want to know how to chage from one decimal ( one number after the comma like 2200,0 ) to two decimals (like 2200,00 ) This is easy to do in VCL with TNumericField(FieldByName('distM')).DisplayFormat := '#,0.00'; Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.