グラフ表示イベント

フォローする

グラフが表示された時のイベント

グラフを表示するときに発生するイベントです。

  • PC用のみで利用できるイベントです。
  • スペースに貼りつけたアプリでは利用できません。

関数

app.report.show

eventオブジェクトのプロパティ

 プロパティ名説明
appId 数値 アプリID

サンプル

グラフ表示時にメッセージを表示します。

記事に関するフィードバック

直接的に記事と関連がないご質問はcybozu developer コミュニティをご活用ください。

Avatar
Nguyễn Hiệp

I would like to access the query that graph used to filter the records in order to display the chart, how could i do it? 

Eg: to show total record for a specific chart, hence i have to send a request with query param to kintone API to get records, but i can not get the exact query for the graph like kintone.app.getQuery () at index page.

Editted: i found that the groups param on chart page url is related to the field used to devide records to categories. but i dont know how to get that id? something 's similar to "groups=f20690"

Nguyễn Hiệpにより編集されました
Avatar
cybozu Development team

Hi Nguyễn Hiệp

We are sorry to say, there is no easy way of getting the data that you need.
The  kintone.app.getQuery () method will let you get the filter conditions used in the Graph, but it will not show the "Group by" options that you would need.
You are correct in saying that the "groups=fxxxx" parameter is where that information lies. You could use a native JavaScript object window.location.href to get the current URL which would include the "groups=fxxxx" information.
But I'm afraid this will not help you much, since the IDs of the fields used here cannot be retrieved by our REST APIs, and can only be obtained by checking the DOM of the fields.

We will let the kintone dev team know of the issue though, as this Graph Event could do better by returning back more information than just the appId.
If you have any other suggestions for any more properties that could be returned for this event (other than field information and query information) , please let us know.

Avatar
Nguyễn Hiệp

Though,i 'll try to manually get the IDs now, i hope the event could provide more information soon
Anyway, thank you for your sincere support.

ログインしてコメントを残してください。
Powered by Zendesk