Chart.js边距

时间:2016-02-23 14:58:00

标签: javascript chart.js

我想知道如何访问Chart.js中图表的左右边距。

寻找类似" chart.canvas.marginLeft"。

的内容

谢谢!

1 个答案:

答案 0 :(得分:7)

使用

SELECT DISTINCT
      app
    , STUFF(
       (SELECT ',' + dev_language
        FROM 
                tbl_apps a
                    INNER JOIN tbl_appsys ON a.app_pk = tbl_appsys.app_pk
                    INNER JOIN tbl_appsys_dev_language  ON tbl_appsys.appsys_pk = tbl_appsys_dev_language.appsys_pk
                    INNER JOIN tbl_dev_language ON tbl_appsys_dev_language.dev_language_pk = tbl_dev_language.dev_language_pk
        WHERE a.app = tbl_apps.app
        FOR XML PATH(''))
    ,1,1,'')
FROM
     tbl_apps 
        INNER JOIN tbl_appsys ON tbl_apps.app_pk = tbl_appsys.app_pk
        INNER JOIN tbl_appsys_dev_language  ON tbl_appsys.appsys_pk = tbl_appsys_dev_language.appsys_pk
        INNER JOIN tbl_dev_language ON tbl_appsys_dev_language.dev_language_pk = tbl_dev_language.dev_language_pk

以下内容将为您提供“边距”

var chart = new Chart(ctx).Line(data);