小编Mic*_*ski的帖子

Javascript amcharts堆积的条形图单击处理程序

我需要类似javascript amCharts图形项目click事件的 东西,我正在使用AmCharts.makeChart,并且似乎无法集成该先前的答案。有人可以通过这种制造弹床的方法来帮助使点击处理程序正常工作吗?任何帮助将不胜感激。

我当前正在使用的代码:

AmCharts.makeChart("0",
{
    "type": "serial",
    "pathToImages": "http://cdn.amcharts.com/lib/3/images/",
"categoryField": "Not set",
"rotate": true,
"colors": [
"#45C40E",
"#E82323"
],
"startDuration": 1,
"startEffect": "easeOutSine",
"handDrawScatter": 4,
"handDrawThickness": 11,
"categoryAxis": {
"gridPosition": "start",
"position": "left",
"axisThickness": 0,
"labelFrequency": 0,
"showFirstLabel": false,
"showLastLabel": false,
"tickLength": 0
},
"trendLines": [],
"graphs": [
{
    "balloonText": "[[title]]:[[value]]",
    "bulletField": "Not set",
    "fillAlphas": 1,
    "id": "AmGraph-1",
    "title": "Yes",
    "type": "column",
    "valueField": "column-1",
    "visibleInLegend": false
},
{
    "balloonText": "[[title]]:[[value]]",
    "fillAlphas": 1,
    "id": "AmGraph-2",
    "title": "No",
    "type": "column", …
Run Code Online (Sandbox Code Playgroud)

javascript onclick amcharts

1
推荐指数
1
解决办法
5681
查看次数

在 Python PIL 中使用可设置的中心和比例裁剪图像

我想使用 PIL 裁剪图像,尽管它可能是其他一些模块。我需要使用比例因子进行裁剪的方法,即 1.5 意味着输出将放大 1.5 倍。此外,我需要设置放大的中心。这意味着将 x/2,y/2 设置为中心会直接缩放到中心,但其他 x,y 值会缩放到这些像素。

如果有人知道如何做到这一点,我将非常感谢任何帮助。

现在我有一些使用 ims = im.crop((int((xx/i)/2), int((yy/i)/2), int((x+(x/i))/2) 的裁剪, int((y+(y/i))/2))) 但这只会放大到中心,而“i”并没有给出一个很好的比例因子。

再次,你的帮助。

python image crop zooming python-imaging-library

1
推荐指数
1
解决办法
2850
查看次数