首页 \ 问答 \ 禁用折线图中的特定图例(Disable a particular legend in a line chart)

禁用折线图中的特定图例(Disable a particular legend in a line chart)

是否有可能在折线图中禁用LineSeries组件的特定图例。

假设我们有以下代码:

<mx:Panel title="Line Chart">
 <mx:LineChart id="myChart" 
    dataProvider="{expenses}" 
    showDataTips="true"
 >
    <mx:horizontalAxis>
       <mx:CategoryAxis 
            dataProvider="{expenses}" 
            categoryField="Month"
        />
    </mx:horizontalAxis>
    <mx:series>
       <mx:LineSeries 
            yField="Profit" 
            displayName="Profit"
       />
       <mx:LineSeries 
            yField="Expenses" 
            displayName="Expenses"
       />
    </mx:series>
 </mx:LineChart>
 <mx:Legend id="legend" dataProvider="{myChart}"/>

它将产生以下折线图:

在此处输入图像描述

这就是我想要的结果:

在此处输入图像描述

更新:

请记住,我必须使用图例的DataProvider作为myChart,因为数据是动态构建的。 此外,图例是定制的。


Is there any possibility to disable a particular legend for LineSeries component in a line chart.

Let say that we have the following code:

<mx:Panel title="Line Chart">
 <mx:LineChart id="myChart" 
    dataProvider="{expenses}" 
    showDataTips="true"
 >
    <mx:horizontalAxis>
       <mx:CategoryAxis 
            dataProvider="{expenses}" 
            categoryField="Month"
        />
    </mx:horizontalAxis>
    <mx:series>
       <mx:LineSeries 
            yField="Profit" 
            displayName="Profit"
       />
       <mx:LineSeries 
            yField="Expenses" 
            displayName="Expenses"
       />
    </mx:series>
 </mx:LineChart>
 <mx:Legend id="legend" dataProvider="{myChart}"/>

It will produce the following line chart:

enter image description here

And this the result that i want:

enter image description here

UPDATE:

Bare in mind that I have to use the legend's DataProvider as myChart because the data is dynamically build. Also, the legend is customized.


原文:https://stackoverflow.com/questions/17853388
更新时间:2021-09-29 06:09

最满意答案

为了后人或其他可能有一天遇到这个问题的人,这里有修复:

问题是本地计算机上的machine.config文件。 该文件没有正确的条目或任何混淆安装程序的内容。

我比较了机器上的machine.config文件,我可以在那里安装/卸载到失败的机器并设置与MySql不同的行,然后再次尝试卸载(或在W81上安装/卸载)。 成功!

这个问题真的让我陷入了困境。 安装程序不应该对该文件敏感。 错误消息有点错误,因为失败不是DLL而是machine.config。


For posterity sake or anyone else that might one day run into this problem, here is the fix:

The problem was the machine.config file on both local machines. The file did not have the proper entries or whatever it had confused the installer.

I compared the machine.config file from a machine, where I could install/uninstall to the failed machines and set the lines that were different with respect to MySql, and then proceeded to try the uninstall (or install/uninstall on W81) again. Success!

This problem really threw me for a loop. The installer should not be so sensitive to that file. The error message was a bit faulty, as the failure was not the DLL but rather the machine.config.

相关问答

更多
  • 一、在控制面板程序中卸载mysql软件 二、卸载过后删除C:\Program Files (x86)\MySQL该目录下剩余了所有文件,把mysql文件夹也删了 三、windows+R运行“regedit”文件,打开注册表 四、删除注册表:HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\Eventlog\Application\MySQL文件夹 五、删除HKEY_LOCAL_MACHINE\SYSTEM\ControlSet002\Services\Even ...
  • 你只要找到它所在的位置,把它整个文件夹删除,如果有删除不了的你可以使用360文件粉碎机来粉碎它,处理后再用360安全卫士优化一下系统就可以了。
  • 解决方法: 1. 在C盘的目录下,有一个隐藏文件——ProgramData,进入C:\ProgramData\MySQL\,删除里面所有文件及文件夹; 2. 进入注册表(win7:开始-运行-regedit;win8:Ctrl+R,输入regedit); 3. Ctrl+F,输入Connector Net X.X.X(根据自己的版本来),查找相关文件,并删除,循环此步骤,直到注册表中再也查不到Connector Net X.X.X; 到此为止,Connector Net X.X.X成功卸载。
  • 你没有卸载干净啊, 硬盘里面 注册表里面 控制面板里面 都要很干净的
  • 我们在卸载MySQL的时候,会发现有一个名为“Connector Net X.X.X”(如:Connector Net 6.9.3)软件总是卸载不成功,下面我们来看看解决方法: 1. 在C盘的目录下,有一个隐藏文件——ProgramData,进入C:\ProgramData\MySQL\,删除里面所有文件及文件夹; 2. 进入注册表(win7:开始-运行-regedit;win8:Ctrl+R,输入regedit); 3. Ctrl+F,输入Connector Net X.X.X(根据自己的版本来),查找相 ...
  • mysql connector net 6.9.9 MySQL Connector/Net 是在由MySQL AB开发类别 Business Open Source 软件。 它是由我们客户端应用程序更新期间的最后一个月的用户更新 1,414 次进行检查。 最新版本是 MySQL Connector/Net 的 6.9.9 2016/08/09 上释放。 它最初被添加到我们的数据库 2007/10/29 上。 MySQL Connector/Net 需要任何 Windows 操作系统,它将被安装在计算机上运行 ...
  • 为了后人或其他可能有一天遇到这个问题的人,这里有修复: 问题是本地计算机上的machine.config文件。 该文件没有正确的条目或任何混淆安装程序的内容。 我比较了机器上的machine.config文件,我可以在那里安装/卸载到失败的机器并设置与MySql不同的行,然后再次尝试卸载(或在W81上安装/卸载)。 成功! 这个问题真的让我陷入了困境。 安装程序不应该对该文件敏感。 错误消息有点错误,因为失败不是DLL而是machine.config。 For posterity sake or anyon ...
  • 万一其他人偶然发现同一问题: 您可以从旧框架运行这两个应用程序,即使使用.NET 4.5构建它也可以处理旧的MySQL连接器框架。 我还没有遇到.NET 4.5项目和为3.5构建的连接器之间的版本兼容性问题。 但是,您必须对旧框架进行新的引用 - 一旦卸载了新的MySQL连接器,依赖它的应用程序将停止运行,直到您安装另一个版本并引用该版本。 In case anyone else stumbles upon the same issue: You can run both applications off ...
  • MySQl和ASP.NET教程 也许这会有所帮助? MySQl and ASP.NET tutorial maybe this will help?

相关文章

更多

最新问答

更多
  • h2元素推动其他h2和div。(h2 element pushing other h2 and div down. two divs, two headers, and they're wrapped within a parent div)
  • 创建一个功能(Create a function)
  • 我投了份简历,是电脑编程方面的学徒,面试时说要培训三个月,前面
  • PDO语句不显示获取的结果(PDOstatement not displaying fetched results)
  • Qt冻结循环的原因?(Qt freezing cause of the loop?)
  • TableView重复youtube-api结果(TableView Repeating youtube-api result)
  • 如何使用自由职业者帐户登录我的php网站?(How can I login into my php website using freelancer account? [closed])
  • SQL Server 2014版本支持的最大数据库数(Maximum number of databases supported by SQL Server 2014 editions)
  • 我如何获得DynamicJasper 3.1.2(或更高版本)的Maven仓库?(How do I get the maven repository for DynamicJasper 3.1.2 (or higher)?)
  • 以编程方式创建UITableView(Creating a UITableView Programmatically)
  • 如何打破按钮上的生命周期循环(How to break do-while loop on button)
  • C#使用EF访问MVC上的部分类的自定义属性(C# access custom attributes of a partial class on MVC with EF)
  • 如何获得facebook app的publish_stream权限?(How to get publish_stream permissions for facebook app?)
  • 如何防止调用冗余函数的postgres视图(how to prevent postgres views calling redundant functions)
  • Sql Server在欧洲获取当前日期时间(Sql Server get current date time in Europe)
  • 设置kotlin扩展名(Setting a kotlin extension)
  • 如何并排放置两个元件?(How to position two elements side by side?)
  • 如何在vim中启用python3?(How to enable python3 in vim?)
  • 在MySQL和/或多列中使用多个表用于Rails应用程序(Using multiple tables in MySQL and/or multiple columns for a Rails application)
  • 如何隐藏谷歌地图上的登录按钮?(How to hide the Sign in button from Google maps?)
  • Mysql左连接旋转90°表(Mysql Left join rotate 90° table)
  • dedecms如何安装?
  • 在哪儿学计算机最好?
  • 学php哪个的书 最好,本人菜鸟
  • 触摸时不要突出显示表格视图行(Do not highlight table view row when touched)
  • 如何覆盖错误堆栈getter(How to override Error stack getter)
  • 带有ImageMagick和许多图像的GIF动画(GIF animation with ImageMagick and many images)
  • USSD INTERFACE - > java web应用程序通信(USSD INTERFACE -> java web app communication)
  • 电脑高中毕业学习去哪里培训
  • 正则表达式验证SMTP响应(Regex to validate SMTP Responses)