• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2021 Huawei Device Co., Ltd.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  *     http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 
16 package ohos.devtools.views.layout.chartview.event;
17 
18 import ohos.devtools.views.charts.model.ChartDataRange;
19 
20 /**
21  * Observer of chart refreshes event
22  *
23  * @since 2021/1/26 19:28
24  */
25 public interface IChartEventObserver {
26     /**
27      * Refresh chart drawing standard
28      *
29      * @param startTime Start time of chart
30      * @param endTime End time of chart
31      * @param maxDisplayMillis Maximum display time on view
32      * @param minMarkInterval The minimum scale interval
33      */
refreshStandard(int startTime, int endTime, int maxDisplayMillis, int minMarkInterval)34     void refreshStandard(int startTime, int endTime, int maxDisplayMillis, int minMarkInterval);
35 
36     /**
37      * Refresh view
38      *
39      * @param range Chart display time range
40      * @param firstTimestamp The first time stamp of this chart's data
41      * @param useCache whether or not use cache
42      */
refreshView(ChartDataRange range, long firstTimestamp, boolean useCache)43     void refreshView(ChartDataRange range, long firstTimestamp, boolean useCache);
44 }
45