 :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :-------------------------------------------------------------------: |
|    rotate    |                                                         旋转，默认按照坐标系中心旋转。![image.png](https://gw.alipayobjects.com/mdn/rms_f5c722/afts/img/A*kP-KR7FyW4cAAAAAAAAAAABkARQnAQ)                                                          |            `chart.coordinate().rotate(-Math.PI * 0.25);`              |
|    scale     |         缩放，默认按照坐标系中心进行缩放![](https://gw.alipayobjects.com/mdn/rms_2274c3/afts/img/A*De4NR7ULUL4AAAAAAAAAAABkARQnAQ#align=left&display=inline&height=252&originHeight=252&originWidth=679&status=done&style=none&width=679)          |             `chart.coordinate('rect').scale(0.7, 1.2);`               |
|  transpose   | x，y 轴置换，例如柱状图转换成水平柱状图（条形图）![](https://gw.alipayobjects.com/mdn/rms_2274c3/afts/img/A*zeCISaB3L_QAAAAAAAAAAABkARQnAQ#align=left&display=inline&height=157&originHeight=157&originWidth=534&status=done&style=none&width=534) |               `chart.coordinate('rect').transpose();`                 |
|   reflect    |      镜像，沿 x 方向镜像或者沿 y 轴方向映射:![](https://gw.alipayobjects.com/mdn/rms_2274c3/afts/img/A*xoudRJG7T2kAAAAAAAAAAABkARQnAQ#align=left&display=inline&height=159&originHeight=159&originWidth=825&status=done&style=none&width=825)      | `chart.coordinate().reflect('x');` `chart.coordinate().reflect('y');` |

## 坐标系的接口设计

结合上面的内容，直角坐标系和极坐标系必须具有的属性或接口：

- 在画布上的范围，需要指定起始点、结束点。

<img src="https://os.alipayobjects.com/rmsportal/uDqMRYlwVbfsdJb.png" style="width: 500px;">

- 将数据从 0-1 映射到画布坐标，将画布上的坐标反转回数据 0-1 的范围内。
- 坐标系的平移、旋转、放大缩小、镜像等转置功能。

### 属性

| 属性名 | 含义             |
| ------ | ---------------- |
| start  | 坐标系的起始点。 |
| end    | 坐标系的结束点。 |

### 方法

| 方法名                | 含义                              |
| --------------------- | --------------------------------- |
| convert(point)        | 将数据从 0-1 空间映射到画布空间。 |
| invert(point)         | 将数据从画布空间反转回 0-1 空间。 |
| translate(x,y)        | 平移。                            |
| rotate(angle)         | 旋转。                            |
| scale(sx,sy)          | 方法、缩小。                      |
| transpose()           | x、y 交换。                       |
| reflect('x'&#124;'y') | 沿着 x 或者 y 进行镜像变换。      |

### 极坐标的特殊属性

由于极坐标是由角度和半径长度两个维度共同构成的，所以有自己特有的属性：

| 方法名      | 含义                                                                       |
| ----------- | -------------------------------------------------------------------------- |
| radius      | 半径长度，0-1 范围内的数值，最终的半径长度 = min(长，宽) / 2 \* radius。   |
| innerRadius | plus 坐标系下，内部空白的半径大小，空白的半径 = min(长，宽) / 2 \* inner。 |
| startAngle  | 极坐标的起始角度。                                                         |
| endAngle    | 极坐标的结束角度。                                                         |

下图为指定了起始角度、结束角度的玫瑰图：

<img src="https://zos.alipayobjects.com/basement/skylark/0ad680ae14790910901892109d17d3/attach/4080/900/image.png" style="width: 500px;">

## API

更详细的配置使用，详见 [API](../../api/general/coordinate)。
Validation is an important part of any web robust application. It makes our application more user-friendly and interactive as well. Forms should be validated properly for all the user input fields. It is essential to use validation to avoid saving/sending invalid data in the database. To guide the user, we use proper meaningful error messages.
Invalid - It is opposite of valid. True if any form input control is invalid.
In Angular, we have different modules for different types of forms. We need to import a specific module explicitly. FormsModule is the module for template-driven forms. Import different modules for template-driven forms.
BrowserModule - It provides various services which are required to launch and run a browser application.
FormsModule - To use template-driven forms.
AppComponent - This is the root component where we implement the form.
When the form module is imported, Angular automatically detects an HTML form element and attached the NgForm component to that element. By adding the NgModel directive, all inputs are registered to NgForm component.
<input [(ngModel)]="name" #nameModel="ngModel" name="name"
<input [(ngModel)]="birthYear" #birthYearModel="ngModel" name="birthYear"
<input [(ngModel)]="city" #cityModel="ngModel" name="city"
Now we have to show errors for the above-mentioned input fields.
The name is a required field. It should be more than 2 characters. The maximum length for this is 80. The pattern is also defined for this input.
The birth year is a required field.
The city is a mandatory field with a maximum length of 80.We work with a lot of top design firms, but Thrive Internet Marketing Agency is one of the best — as evidenced by their rating on our site. Read on to learn what sets Thrive Internet Marketing Agency apart and why you should choose them for your next digital project.
Thrive is the king of SEO, and if you are looking for an agency that can help you bring in more inbound traffic, you should definitely seek them out. Many of their clients pay for their new website in the first month alone, just from additional inbound traffic revenue. That’s a lot of inbound traffic, and it comes from Thrive’s attention to the little details. With a custom-coded site (no templates), in-house content writing, and an extensive SEO Code of Ethics, Thrive goes above and beyond to provide you with a search-engine optimized website that will stand the test of time.
At Thrive, it all starts with you. Before making recommendations, they listen to your goals, concerns, and anything else you’d like to add. After they’ve gained valuable insights, they will give suggestions using their expertise to create a plan that will meet or exceed your goals. When you sign off on the plan, the whole team starts moving. Designers design. Writers write. And everyone works together to craft your site into an SEO superstar that will do everything you want it to do and more.
Curious how it all works? Recently, Thrive worked with Stovall Construction, a company looking to increase their brand awareness and receive quality leads online. By focusing on a custom responsive WordPress design, custom content